Wednesday, November 6, 2013

Oracle SOA: How to Configure Transaction Timeout for BPEL on SOA 11g

During runtime of your BPEL process you may be seeing errors like this:

Transaction Rolledback.: weblogic.transaction.internal.TimedOutException: 
Transaction timed out after 30 seconds 
BEA1-484455D7A39364D50D1F
 at 
weblogic.transaction.internal.ServerTransactionImpl.wakeUp(ServerTransactionImpl.java:1788)

 at 
weblogic.transaction.internal.ServerTransactionManagerImpl.processTimedOutTransactions(ServerTransactionManagerImpl.java:1676)

 at 
weblogic.transaction.internal.TransactionManagerImpl.wakeUp(TransactionManagerImpl.java:1988)

 at 
weblogic.transaction.internal.ServerTransactionManagerImpl.wakeUp(ServerTransactionManagerImpl.java:1586)

 at 
weblogic.transaction.internal.WLSTimer.timerExpired(WLSTimer.java:35)
 at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
 at 
weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)

 at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
 at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
; nested exception is: weblogic.transaction.internal.TimedOutException: 
Transaction timed out after 30 seconds 
BEA1-484455D7A39364D50D1F

The solution is typically to increase the transaction timeout for the process.
But how do we could configure transaction timeout for BPEL on SOA 11g?

In the first, before we start changing, we should keep in mind two generall rules:
  • This solution is ONLY applicable to Sync Processes
  • syncMaxWaitTime < BPEL EJB's transaction timeout < Global Transaction Timeout

Let's start from syncMaxWaitTime. This property controls the maximum time the process result receiver will wait for a result before returning for Sync processes.

To change default value you should run Enterprise Manager and go to Farm -> SOA -> "soa-infra" branch and next select from context menu: SOA Administration -> BPEL Properties and expand "More BPEL Configuration Properties...".


Next thing you can change is BPEL EJB's transaction timeout. You can/should update the timeout for following EJB's:
  • BPELActivityManagerBean
  • BPELDeliveryBean
  • BPELDispatcherBean
  • BPELEngineBean
  • BPELFinderBean
  • BPELInstanceManagerBean
  • BPELProcessManagerBean
  • BPELSensorValuesBean
  • BPELServerManagerBean
The timeout properties for the EJBs control the particular timeout setting for the SOA application, overriding the global setting specified by the JTA timeou.

To perform changes you have to run Administration Console, stop SOA server/cluster and next go to Deployments -> soa-infra and expand this position:


For each of cited EJB's you can change default timeout value in Configuration tab (you have to click on selected EJB to view its properties and next select second tab described as Configuration).

To modify Global Transaction Timeout go to Services -> JTA in Administration Console, as shown below:


After applying this change you have to restart Weblogic Domain.


1 comment:

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java EE Online Training from India . Nowadays Java has tons of job opportunities on various vertical industry.

    ReplyDelete