Monday, October 31, 2011

Oracle SOA Suite 11g – Attaching the Common/Generic deployment plan file to all the SOA Composites.

Oracle SOA Suite 11g – Attaching the Common/Generic deployment plan file to all the SOA Composites:

The deployment plan file can be used to change the run time configurations like WSDL endpoint, value of the partner link properties and the host details across the environments.
The plan file need to be created for each composite and the same has to be attached during the deployment.
Generic plan file also can be created and attached to deploy all the composites.
By using the generic plan file all the configuration changes can be maintained in same place also no need of creating different plan files for each composite.

Generic Plan file:
The blow is the sample Generic plan file that can be used across the composites deployment.
The generic plan file will have the configuration details for all the composites.

When deploying, attach this Plan file to all the Composites.

Before deploying the composite ,replace the tokens in the plan file with the actual values.
The below ant script can be used to deploy the composites with the plan file to the server.
ant -f ant-sca-deploy.xml
Attached the sample plan file for your reference.

DOWNLOAD Generic Plan File

Sunday, October 30, 2011

Oracle SOA Suite 11g – Getting the default version of the Composite

Oracle SOA Suite 11g – Getting the default version of the Composite:

Sometimes it required to get the default version of the Composite. Below are the different approaches to get the default version of the composite in Oracle SOA Suite 11g.

Through Ant Script:

Execute the below ant script, this will return the default version of the specified composite.
ant -f $ORACLE_HOME/bin/ant-sca-mgmt.xml getDefaultCompositeRevision -Dhost=nft-soa-vip1 -Dport=8004 -Duser=weblogic -DcompositeName=GetOpenCompositeInstances
$ORACLE_HOME – Where the SOA binary is installed.

Through EM Console:

1. Login to EM Console.
2. From the navigation pane, expand the farm and SOA folders then right click on soa-infra and then select Administration and System MBean browser.
3. Expand the folder Application Defined MBeans then oracle.soa.config then expand the Server folder. Expand CompositeLifecycleConfig folder and click on the soa-infra MBean.
4. Click on the Operations tab then click on the operation getDefaultComposite .

5. Enter the CompositeDN value for that we have to get the default version and click on invoke button; this will provide the details about the default version of the composite.

Through JMX:

The below code snippet can be used to get the default version of the composite from JAVA.
Change the SOA server details and the composite details accordingly.

package getdefaultversion;

import java.util.Hashtable;
import java.util.Set;


import javax.naming.Context;

import oracle.fabric.composite.model.CompositeNameModel;

public class GetCompositeDefaultVersion {
//This method will return the default version of the specified Composite.
static MBeanServerConnection m_connection = null;

public static String getDefaultVersion() {
String jndiroot = "/jndi/";
String revision = null;

try {
Hashtable jndiProps = new Hashtable();
jndiProps.put(Context.SECURITY_PRINCIPAL, "weblogic");
jndiProps.put(Context.SECURITY_CREDENTIALS, "xxxxx");

JMXServiceURL serviceURL = new JMXServiceURL("t3","eaidev2",8000,jndiroot + "");
JMXConnector m_connector =
JMXConnectorFactory.newJMXConnector(serviceURL, jndiProps);
m_connection = m_connector.getMBeanServerConnection();
ObjectName compositeLifeCycleMBean = null;
Set queryResult =
m_connection.queryNames(new ObjectName("*:j2eeType=CompositeLifecycleConfig,*"),
if (!queryResult.isEmpty()) {
compositeLifeCycleMBean =
//CompositeDN - DomainName/CompositeName
String compositeDN = "default" + '/' + "GetDomainID";
revision =
getDefaultCompositeRevision(compositeLifeCycleMBean, compositeDN);
} catch (Exception e) {
return revision;

public static String getDefaultCompositeRevision(ObjectName compositeLifeCycleMBean,
String compositeDN) throws Exception {
String revision = null;
CompositeData deployedComposite =
new Object[] { compositeDN },
new String[] { String.class.getName() });
if (deployedComposite != null) {
CompositeNameModel cm =
revision = cm.getRevision();
System.err.println("Default Revision...." + revision);
return revision;

public static void main(String[] args) {


o/p - Default Revision....1.0

Contact Form


Email *

Message *