OFM 11g: Starting WebLogic Server with opmnctl
There are many ways to start the Oracle WebLogic Server 10.3. or higher. The most common is to use the provided script and off you go. To automate this, I usually use scripts and include them in the normal System V boot process as implemented in Linux or Solaris.
A Common Way for Unix-based Systems
Here is a script, I'm using very often:
#!/bin/sh
ORACLE_HOME=/opt/oracle/product/wls/10.3.1
DOMAINS_HOME=$ORACLE_HOME/user_projects/domains
DOMAINS="test login"
start() {
for i in $DOMAINS
do
export WLS_REDIRECT_LOG=$DOMAINS_HOME/$i/wls_${i}_$$.log
eval $DOMAINS_HOME/$i/bin/startWebLogic.sh &
done
}
stop() {
for i in $DOMAINS
do
$DOMAINS_HOME/$i/bin/stopWebLogic.sh
done
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
restart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 1
esac
Platform Neutral: Leverage opmn
In OFM 11g the opmn Process Management Systems is still in use. If your architecture includes an opmn installation it would be a waste of resources to use shell scripts to start all your bits and pieces.
One specific architecture is the typical "JEE Application Server behind Apache" one. Apache uses a mod plugin to redirect the requests to the configured JEE application server. mod_oc4j is a typical example for older Oracle AS versions. With OFM 11g Oracle HTTP Server (OHS) comes a mod_wls_ohs that does the same for the OHS-WebLogic combination.
The only requirement is to start both parts in a good order to service all requests from the very beginning. You can achieve this with a good combination of the above mentioned shell scripts. Or you could add new entries to your opmn.conf.
Here is a sample entry for a single WebLogic domain:
<ias-component id="wls-login" status="enabled" id-matching="false">
<environment>
<variable id="WLS_REDIRECT_LOG"
value="/opt/oracle/product/fmw/11.1.1.1/user_projects/domains/login/wls.log"
append="false"/>
</environment>
<process-type id="WLS" module-id="CUSTOM">
<start timeout="3000" />
<stop timeout="3000" />
<process-set id="WLS" restart-on-death="true" numprocs="1">
<module-data>
<category id="start-parameters">
<data id="start-executable"
value="/opt/oracle/product/fmw2/11.1.1.1/user_projects/domains/login/bin/startWebLogic.sh"/>
</category>
<category id="stop-parameters">
<data id="stop-executable"
value="/opt/oracle/product/fmw2/11.1.1.1/user_projects/domains/login/bin/stopWebLogic.sh"/>
</category>
</module-data>
</process-set>
</process-type>
</ias-component>
Quiz
When you have implemented OFM 11g in some way, you have noticed some changes in the file structure. Where do we find the opmn.xml in OFM 11g (eg in the Web Tier installation)? Please post your suggestions as comment.