We can also start up or shut down individual Java components
across your Oracle BI domain using WLST. The following example WLST script
shows the steps to stop and then start the BI Publisher Java component.
1 .
Type the below script in notepad
import sys
import os
argLen = len(sys.argv)
if argLen -1 != 4:
print
"ERROR: got ", argLen -1, " args."
print
"USAGE: wlst.cmd restartBIP.py WLS_HOST WLS_PORT WLS_USER
WLS_PASSWORD"
print
" eg: wlst.cmd restartBIP.py localhost 7001 weblogic Welcome1"
exit()
WLS_HOST = sys.argv[1]
WLS_PORT = sys.argv[2]
WLS_USER = sys.argv[3]
WLS_PW = sys.argv[4]
print 'Connecting to ' + WLS_HOST + ':' + WLS_PORT + ' as
user: ' + WLS_USER + '...'
# Connect to the WLS
connect (WLS_USER, WLS_PW, WLS_HOST+ ':' + WLS_PORT);
print 'Connecting to the Servers Configuration MBean...'
cd('Servers')
ls()
## Stop BI publisher
print 'Stopping BI Publisher Java component...'
progress=stopApplication('bipublisher#11.1.1')
## Start BI Publisher
print 'Starting BI Publisher Java component...'
progress=startApplication('bipublisher#11.1.1')
2 .
Save the file as restartBIP.py in the following location middleware_home\Oracle_BI1\common\bin. Save the
file as .py extension
3 .
Call the above file (restartBIP.py) using
command prompt as follows- middleware_home\Oracle_BI1\common\bin>wlst
restartBIP.py localhost 7001 weblogic Welcome1 restart
We can substitute other application names if we wish to stop
or start other java applications. We can use the Fusion Middleware Control to
determine the names to use in the script by looking at the list of applications
in the Application Deployments folder in the navigation tree menu.