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.
Comments (4)
ORACLE_INSTANCE/config/OPMN/opmn/opmn.xml
Posted by Matt Topper | September 24, 2009 6:29 PM
Posted on September 24, 2009 18:29
We find opmn.xml file here in OFM11g:
ORACLE_INSTANCE/config/OPMN/opmn/opmn.xml
Where
An Oracle instance is a directory that contains a set of system components managed by a common OPMN.
regards
Posted by Fahd Mirza | September 24, 2009 7:52 PM
Posted on September 24, 2009 19:52
Olaf, Nice tip on scripting weblogic startup.
coming to your Quiz (I liked this idea and may soon include in my blog http://onlineAppsDBA.com )
as with 11g , all configuration & log files are in INSTANCE_HOME so I would say $INSTANCE_HOME/OPMN/[component_name]/
I could have N instances per ORACLE_HOME so each INSTANCE_HOME should have one opmn.xml
Am I correct ;-) ?
Regards
Atul Kumar
Posted by Atul Kumar | September 24, 2009 11:45 PM
Posted on September 24, 2009 23:45
in MiddlewareHome/OHSinstance/config/OPMN/opmn
ex: MW_HOME/Webtier/instances/instance1/config/OPMN/opmn
where MW_HOME is /Oracle/Middleware for example.
Posted by Jean-Marc Desvaux | October 14, 2009 2:20 PM
Posted on October 14, 2009 14:20