Monday, October 31, 2011

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

Oracle SOA Suite – 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
-DserverURL=http://localhost:8001
-DsarLocation=C:\demo\Project\deploy\sca_Project_rev6.jar
-Doverwrite=true
-Duser=weblogic
-DforceDefault=true
-Dconfigplan=C:\demo\deploymentplan.xml

Attached the sample plan file for your reference.

DOWNLOAD Generic Plan File

Sunday, October 30, 2011

Oracle SOA Suite – Getting the default version of the Composite


Oracle SOA Suite – 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 or Oracle SOA Suite 12c

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 .


Friday, October 28, 2011

Oracle SOA Suite – Disabling the Auto recovery of Faulted Instances,invoke and callback messages.


Oracle SOA Suite – Disabling the Auto recovery of Faulted Instances,invoke and callback messages:

Auto recovery is the functionality to recover the faulted instances and Invoke and Callback messages in Oracle SOA 11g or Oracle SOA 12c
Sometimes we need to disable this feature to avoid unnecessary table space growth and recovering the instance that fail even after the recovery.

Disabling recovery attempts for faulted instances.

1. Log in to Oracle Enterprise Manager Fusion Middleware Control.
2. Right-click soa-infra.
3. Select SOA Administration > BPEL Properties.
4. Click More BPEL Configuration Properties.
5. In the Name column, click RecoveryConfig.
6. Expand RecurringScheduleConfig.
7. Set the following properties to values and click Apply.
maxMessageRaiseSize =0
8. Expand StartupScheduleConfig, respectively.
9. Set the following properties to values and click Apply.
maxMessageRaiseSize=0


Oracle SOA Suite – Creating SOA partition through WLST

Oracle SOA Suite – Creating SOA partition through WLST:


In Oracle SOA Suite 10g we had the functionality to create different domains in the BPEL Console to group our applications.
The same functionality can be achieved in Oracle SOA Suite 11g or Oracle SOA Suite 12c by creating different partitions.
The SOA Composites can be grouped into different partitions as shown below.





WLST Script:

The below code snippet will enable us to create the required partitions in SOA server.
The required values need to be changed accordingly.

from oracle.fabric.blocks.folder import Folder
from oracle.fabric.management.folder import FolderManager
from javax.management import MBeanException
from java.lang.reflect import InvocationTargetException
# This command creates the partition
# @partitionName The name of the partition
def sca_createPartition(partitionName):
foldermbean = sca_getFolderMBean();
print 'partitionName =', partitionName
params = jarray.array([partitionName],java.lang.Object)
signature = jarray.array(['java.lang.String'],java.lang.String)
try:
# print 'Calling folder mbean to create partition...'
mbs.invoke(foldermbean, "create", params, signature)
# print 'Partition was successfully created.'
print WLSTMessageBundle.getStringNoArg(WLSTMessageID.FOLDER_CREATE_SUCCESS)
except MBeanException, mbeanEx:
if mbeanEx.getCause() != None and isinstance(mbeanEx.getCause(), InvocationTargetException) and mbeanEx.getCause().getCause() != None:
# print mbeanEx.getCause().getCause()
print WLSTMessageBundle.getStringWithOneArg(WLSTMessageID.MSG_EXCEPTION, mbeanEx.getCause().getCause().getMessage())
else:
print WLSTMessageBundle.getStringWithOneArg(WLSTMessageID.MSG_EXCEPTION, mbeanEx)
except Exception, detail:
print 'Exception:', detail
# print WLSTMessageBundle.getStringWithOneArg(WLSTMessageID.MSG_EXCEPTION, detail)
def sca_checkWLSConnection2():
if (mbs is None):
# raise UserWarning, "No connection to a Weblogic server exists. This operation can be executed only in the online mode."
raise UserWarning, WLSTMessageBundle.getStringNoArg(WLSTMessageID.MBEAN_NO_CONNECTION)
def sca_getFolderMBean():
sca_checkWLSConnection2()
# serverMbName = ObjectName('oracle.soa.config:j2eeType=CompositeStore,name=online,*')
serverMbName = ObjectName('*:j2eeType=FolderLifecycleConfig,*')
beans = mbs.queryMBeans(serverMbName, None)
if beans != None and java.util.Iterator.hasNext(beans.iterator())==true:
return beans.iterator().next().getObjectName()
else:
# raise UserWarning, 'Cannot find folder lifecycle mbean on this server.'
raise UserWarning, WLSTMessageBundle.getStringNoArg(WLSTMessageID.FOLDER_MBEAN_NOT_FOUND)
# This command deletes the partition
#
# @partitionName The name of the partition
def sca_deletePartition(partitionName):
foldermbean = sca_getFolderMBean();
print 'partitionName =', partitionName
params = jarray.array([partitionName],java.lang.Object)
signature = jarray.array(['java.lang.String'],java.lang.String)
try:
# print 'Calling folder mbean to destroy partition...'
mbs.invoke(foldermbean, "destroy", params, signature)
# print 'Partition was successfully destroyed.'
print WLSTMessageBundle.getStringNoArg(WLSTMessageID.FOLDEDR_DESTROY_SUCCESS)
except MBeanException, mbeanEx:
if mbeanEx.getCause() != None and isinstance(mbeanEx.getCause(), InvocationTargetException) and mbeanEx.getCause().getCause() != None:
# print mbeanEx.getCause().getCause()
print WLSTMessageBundle.getStringWithOneArg(WLSTMessageID.MSG_EXCEPTION, mbeanEx.getCause().getCause().getMessage())
else:
print WLSTMessageBundle.getStringWithOneArg(WLSTMessageID.MSG_EXCEPTION, mbeanEx)
except Exception, detail:
# print 'Exception:', detail
print WLSTMessageBundle.getStringWithOneArg(WLSTMessageID.MSG_EXCEPTION, detail)
def main():
connect("soaUserName","soaPassword","t3://SOA Server HostName:SOA Server Port")
sca_createPartition("CRMSYNC");
sca_createPartition("CRMASYNC");
sca_createPartition("MEDIATOR");
sca_createPartition("UTILITIES");
disconnect()
print 'successfully created the partions'
main()

Attached soaManagePartition.py file for your reference.
soaManagePartition.py

Changing the Audit Level for Oracle SOA Suite

 Changing the Audit Level for Oracle SOA Suite 11g or Oracle SOA Suite 12c


SOA 11g has three different Audit levels – Production, Development and Off

Audit Level Details:

Audit Level
Description
Production(Default)
Composite instance tracking is collected, but Mediator engine will not collect payload details and BPEL engine will not collect payload details for assign activities (payload details for other BPEL activities are collected). This level is optimal for most normal production operations.
Development
Allows both the composite instance tracking and payload detail tracking. However it may impact the performance. This level is useful mostly for testing and debugging purposes.
Off
No logging is performed. Composite instance tracking and payload details are not collected.

Changing the Audit Level for SOA:

1. Login to EM console.
2. Expand the SOA folder and right-click the soa-infra and select SOA Administration – Click on Common Properties