Example: Using WLST Commands to Stop and Start Oracle Business Intelligence

22-14 System Administrators Guide for Oracle Business Intelligence Enterprise Edition java -classpath JavaClassName host port username password SenderDisplayName For example: java -classpath MW_HOMEwls_10.3serverlibwjmxclient.jar com.oracle.bi.example.MBeanAPIExample3Edit localhost 7001 user1 password1 FredBloggs Use quotation marks to include spaces, for example Fred Bloggs. The command window and log file, displays prompts and messages, for example: Connecting using URL: service:jmx:t3:localhost:7001jndiweblogic.management.mbeanservers.domainrun time ... Connected OK Found BI Instance MBean: oracle.biee.admin:type=BIDomain.BIInstance,biInstance=coreapplication,group=Ser vice Getting Email MBean ... Found BI Email MBean: oracle.biee.admin:type=BIDomain.BIInstance.EmailConfiguration,biInstance=coreap plication,group=Service Locking domain ... Locked domain OK Existing email displayname is: Oracle Business Intelligence Changing email displayname to: FredBloggs Committing changes ... Committed changes OK

22.3.4 Scaling Out for High Availability and Performance Using the Oracle BI Systems Management API

You can use the Oracle BI Systems Management API to scale out to additional host computers for high availability and performance. Use the Enterprise Install to install Oracle Business Intelligence onto a new host computer, and then scale out using steps similar to those described in the following examples: ■ Section 22.3.4.1, Example: Using WLST to Scale Out to Servers ■ Section 22.3.4.2, Example: Using a Java Program to Scale Out to Servers

22.3.4.1 Example: Using WLST to Scale Out to Servers

This example connects a user to Oracle Business Intelligence and scales out to a server. To use WLST commands in a script to scale out to servers: 1. Open a text editor and create a WLST script similar to the following example: Example to demonstrate connecting to a BIEE domain using WLST and do some scale-out operations. This scripts expects the following arguments: 1. wls.host localhost 2. wls.port 7001 3. wls.user user1 4. wls.password password1 Introducing the Oracle BI Systems Management API 22-15 5. oracle instance name 6. new count of bi servers =================================================================== import sys import os Check the arguments to this script are as expected. argv[0] is script name. argLen = lensys.argv if argLen -1 = 6: print ERROR: got , argLen -1, args. print USAGE: wlst.cmd wls_connect.py WLS_HOST WLS_PORT WLS_USER WLS_ PASSWORD OracleInstance numBIServers print eg: wlst.cmd wls_connect.py localhost 7001 user1 password1 instance2 2 exit WLS_HOST = sys.argv[1] WLS_PORT = sys.argv[2] WLS_USER = sys.argv[3] WLS_PW = sys.argv[4] oracleInstanceName = sys.argv[5] convert string to int which is needed later newNumBIServers = intsys.argv[6] print Connecting to + WLS_HOST+ : + WLS_PORT + as user: + WLS_USER + ... Connect to WLS connectWLS_USER, WLS_PW, WLS_HOST+ : + WLS_PORT; print Connecting to Domain ... domainCustom cd oracle.biee.admin print Connecting to BIDomain MBean ... cd oracle.biee.admin:type=BIDomain,group=Service biinstances = getBIInstances biinstance = biinstances[0] oracleinstances = getOracleInstances print Connecting to BIInstance MBean ... cd .. print About to cd to: + biinstance.toString cd biinstance.toString servicestatus=getServiceStatus print BIInstance MBean; ServiceStatus: + servicestatus print Looping through OracleInstances looking for: + oracleInstanceName matching = false for oi in oracleinstances: cd.. print About to cd to: + oi.toString cd oi.toString id = getId print Found instance with id: + id 22-16 System Administrators Guide for Oracle Business Intelligence Enterprise Edition if id == oracleInstanceName: matching = oi break if matching : print Found matching OracleInstance... else : print Failed to find target OracleInstance with name: + oracleInstanceName exit deployments = getBIInstanceDeployments Should only ever be one of these deployment = deployments[0] print Acquired BIInstanceDeployment : + deployment.toString cd.. cd oracle.biee.admin:type=BIDomain,group=Service print Calling lock ... objs = jarray.array[], java.lang.Object strs = jarray.array[], java.lang.String invokelock, objs, strs cd.. cddeployment.toString numBIServers = getnumBIServers print Current number of BI Servers is:, numBIServers print About to set number of BI Servers to:, newNumBIServers setnumBIServers, newNumBIServers print Successfully set number of BI Servers to, newNumBIServers print Calling commit ... cd .. cd oracle.biee.admin:type=BIDomain,group=Service objs = jarray.array[], java.lang.Object strs = jarray.array[], java.lang.String invokecommit, objs, strs print Committed OK print Connecting to BIInstance MBean ... cd .. cd biinstance.toString servicestatus=getServiceStatus print BIInstance MBean; ServiceStatus: + servicestatus print Calling stop ... objs = jarray.array[], java.lang.Object strs = jarray.array[], java.lang.String invokestop, objs, strs servicestatus=getServiceStatus print BIInstance MBean; ServiceStatus: + servicestatus print Calling start ... objs = jarray.array[], java.lang.Object strs = jarray.array[], java.lang.String invokestart, objs, strs