« Book Review: Oracle SOA Suite Developer's Guide | Main | Revisited: Including a Class-Path In Your MANIFEST.MF »

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.

Comments (4)

ORACLE_INSTANCE/config/OPMN/opmn/opmn.xml

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

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

Jean-Marc Desvaux:

in MiddlewareHome/OHSinstance/config/OPMN/opmn

ex: MW_HOME/Webtier/instances/instance1/config/OPMN/opmn

where MW_HOME is /Oracle/Middleware for example.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on September 24, 2009 2:24 PM.

The previous post in this blog was Book Review: Oracle SOA Suite Developer's Guide.

The next post in this blog is Revisited: Including a Class-Path In Your MANIFEST.MF.

Many more can be found on the main index page or by looking through the archives.

Top Tags

Powered by
Movable Type and Oracle