Saturday, June 8, 2013

Timeout setting in SOA 11g for tuning BPELs

Configure Transaction Timeout or Tune Up BPEL SOA 11g for rolled back error or Timed out Exception

Problem:
During runtime you may be seeing errors in the log similar to the following:
The transaction was rolled back
 and / or
<faultstring>java.lang.IllegalStateException: Cannot call setRollbackOnly() current thread is NOT associated with a transaction</faultstring>
 and / or
Transaction Rolledback.: weblogic.transaction.internal.TimedOutException: Transaction timed out
The solution is typically to increase the transaction timeout for the process.

Solution:
 
As a general rule, you should keep the following relation between the timeout parameters: 
syncMaxWaitTime < BPEL EJB's transaction timeout < Global Transaction Timeout(JTA) 
Few recommendations are, 
900<1800<2400 - For Medium load
900<3200<3600 - For Large load
sometimes depending on your requirement/load you might need to go for higher values. 

1. Setting syncMaxWaitTime: 
This property controls the maximum time the process result receiver will wait for a result before returning for Sync processes.
 For SOA 11g R1 PS1 (11.1.1.1.0 to 11.1.1.5):
 * Login into EM
* Expand SOA and right click on "soa-infra" and select: SOA Administration -> BPEL Properties
* Click on "More BPEL Configuration Properties..." link
* Locate syncMaxWaitTime and change it. 

2. Setting the transaction timeout for BPEL EJBs: 
The timeout properties for the EJBs control the particular timeout setting for the SOA application, overriding the global setting specified by the JTA timeout.
* Log into Oracle WebLogic Administration Console.
* Click Deployments.
* Expand soa-infra -> EJBs.
* Following EJBs need to be updated: 
BPELActivityManagerBean
BPELDeliveryBean
BPELDispatcherBean
BPELEngineBean
BPELFinderBean
BPELInstanceManagerBean
BPELProcessManagerBean
BPELSensorValuesBean
BPELServerManagerBean
 
* You can change the parameter in the Configuration tab for the Transaction Timeout setting.
* Click Save.
* Save the Plan.xml to some known location - Ensure no other file is named Plan.xml.
* Update soa-infra deployment.
* Start SOA Managed Server. 

3. Setting the global transaction timeout at Weblogic Domain Level: 
This property controls the transaction timeout seconds for active transactions. If the transaction is still in the "active" state after this time, it is automatically rolled back.
* Log into Oracle WebLogic Administration Console.
* Click Services -> JTA.
* Change the value of Timeout Seconds (the default is 30).
* Click Save.
* Restart Oracle WebLogic Server.

Saturday, January 26, 2013

Configuring Node Manager and Starting SOA server from Admin Console


Configuring NodeManager and Starting soa server from admin console:

1. Log into C:\Oracle\Middleware\wlserver_10.3\server\bin and run installNodeMgrSvc.cmd from command prompt. If it says 'access is denied', then right click on installNaodeMgrSvc.cmd and say 'Run as Administrator'.
2. From command prompt say, 'startNodeManager.cmd'. This will start the nodemanager.
3. If there is an exception as below when starting node manger

                <Jan 26, 2013 2:58:57 PM> <INFO> <Saving node manager configuration properties to 'C:\Oracle\MIDDLE~1\WLSERV~1.3\common\NODEMA~1\nodemanager.properties'>
<Jan 26, 2013 2:58:57 PM> <SEVERE> <Fatal error in node manager server>
java.lang.NullPointerException
                at java.util.Hashtable.containsKey(Hashtable.java:307)
                at weblogic.nodemanager.server.NMServerConfig.initNetworkInfoList(NMServerConfig.java:491)
                at weblogic.nodemanager.server.NMServerConfig.getNetworkInfoList(NMServerConfig.java:481)
                at weblogic.nodemanager.server.NMServerConfig.getConfigProperties(NMServerConfig.java:545)
                at weblogic.nodemanager.server.NMServer.<init>(NMServer.java:154)
                at weblogic.nodemanager.server.NMServer.main(NMServer.java:375)
                at weblogic.NodeManager.main(NodeManager.java:31)

then, apply patch p12564602_1035_Generic on WLS_10.3.5 using smart update. Check if this patch is already applied. Bug Number: 12564602

3. After applying the patch repeat steps 1 and 2.
4. If there is an exception like 'java.net.BindException: Address already in use: JVM_Bind', then update nodemanager.properties in the path C:\Oracle\Middleware\wlserver_10.3\common\nodemanager. Update the below values

ListenAddress=localhost
ListenPort=5557
SecureListener=false
AuthenticationEnabled=false

Restart the node manager.
Then on the weblogic console for your Machine\Node Manager\Configuration set the following:

Type: Plain
Listen Address: localhost
Listen Port: 5557

5. Start SOA server from weblogic console.