Search This Blog

Oracle Fusion Middleware Administration Course

Oracle Fusion Middleware Administration Course
OFMW Admin Course

Saturday, June 15, 2013

SOA Retire Activate Composites

Why we need retire and activate composites?

Before you go for bouncing the SOA Suite Domain which contains SOA, ADF Clusters with multiple managed servers, where each Weblogic server hosted all the sessions which are in execution state on them must be persisted to a restore further when Servers back to RUNNING state. To make this possible we need to use the retire composites and then after RUNNING servers bring them back to activate state for service.

Here is a sample trail script where the SOA application composites management. Here you need to navigate to the or cmd path. To access SCA function you must start WLST from /common/bin. When trying to run the SOA WLST command from regular 'java weblogic.WLST' cannot execute the SCA functions. When you try to execute the sca_retireComposite() it could throw the 'NameError'. So the cause is started WLST from the wrong location, to avoid that our PATH is to change and run the script from the following path: $SOA_ORACLE_HOME/common/bin/ will work on Unix/Linux environments. Similarly you choose for Windows environment instead of using executing the shell script you need to use 'call' in the batch script.

Here the major task we have proceeding with the following two functions.

  1. Retire is to retire the composites .
  2. Activate is to activate the composites.
def retireComposites(Soahost,port, username,password,scacompositename, ver):
        sca_retireComposite(Soahost, port, username, password, scacompositename, revision=ver, partition='default') 
def activateComposites(Soahost,port, username,password,scacompositename, ver):
        sca_activateComposite(Soahost, port, username, password, scacompositename, revision=ver, partition='default')
if __name__== "main":
        print "1.To retire composites"
        print "2.To activate composites"
        print "3.Exit from Menu"
        ch=input('Enter Your Choice: ')
        if ch== 1 :
                for c in f:
                        retireComposites(Soahost,port, username,password,c, ver)
        elif ch == 2 :
                for c in f:
                        activateComposites(Soahost,port, username,password,c, ver)

Here is the composite.txt sample, where you can specify your composites configured in the SOA partition. Which are usually visible on enterprise manager(em) console. Oracle must given a easy module for displaying the deployed SCA composites list. Anyway we have stored in a separate file as shown below. You have flexibility of changing the order when you use this composite.txt file.


The actual trouble started when we tried to use a separate composite.txt file. each line can be read and the value always having at the end an EOL ( \n ). To supress that escape sequance we have used python scring function rtrip function.

The regular properties file which is loaded on the fist line can be created as follows:


Please share this with your friends and collegues, comment if you already tried or successfully implemented on your SOA environment.

Video References:

Iris Li demonstrates how to deploy a SOA composite application using the Oracle Enterprise Manager 11g

SOA Composites references :


  1. I like the script , was able to use in 5 minutes, only thing I need to figure out is how to clear the error and send partition as a variable .. thanks Pavan, thumbs up for your work.

  2. Hello Gopi,

    I wrote a script to stop and start multiple composites based on the property file.

    I am getting * at the end of the compositeDN as below

    compositeDN =default/ErrorService!2.0*

    and getting the below error The configuration file, deployed-composites.xml, does not contain the default/ErrorService!2.0* composite element.

    when I run the script with hardcoded values it is working fine, can you please guide me on fixing this issue.

    I am not getting the * at the end of compositeDN as above, when I run with hardcoded values.

    1. Is THIS "ErrorServlet!2.0" you want to deploy? or something other? To avoid '*' at the end you can use rstrip Python function as :

      compositeDN ="default/ErrorService!2.0*"
      print compositeDN.rstrip('*')

      Let me know if it is helpful.

  3. Bluehost is the best hosting provider with plans for all of your hosting needs.


Please write your comment here

Popular Posts

Oracle WebLogic Administration Course

Oracle WebLogic Administration Course
WebLogic Training