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:

ORACLE_INSTANCE/config/OPMN/opmn/opmn.xml

Posted by Matt Topper on September 24, 2009 at 11:29 AM CEST #

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 on September 24, 2009 at 12:52 PM CEST #

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 on September 24, 2009 at 04:45 PM CEST #

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 on October 14, 2009 at 07:20 AM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This is my blog for things I found useful during my work as Senior Solution Architect for Identity Management and Service-oriented Architecture at Oracle. All text expressed on this blog is my own opinion and not related to my employer.

Search

Top Tags
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today