Everyone who ever used a synchronous BPEL process, has seen this exception in the opmn/logs of the BPEL engine, if the process needs more time than 45s:
Failed to handle dispatch message ... exception ORABPEL-05002
Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.PerformMessage"; the exception is: An exception occurred during transaction completion: ; nested exception is: javax.transaction.RollbackException: Timed out
If you search for this error on forums.oracle.com, you will get an easy answer:
change the syncMaxWaitTime via BPELConsole and you are done.
But this does not help... So what parameters have to be changed, to achieve that synchronous BPEL processes do not get this timeout?
The Oracle BPEL team knows about this problem, because they have written the answer in this
document in the paragraph "
Troubleshooting and Workarounds". But the problem is the misleading title "Setting Properties for BPEL Processes to Successfully Complete and Catch Exception Errors".
Here a short summary what you have to do:
1.) $Oracle_Home\j2ee\home\config\transaction-manager.xml:
change the transaction-timeout parameter t1
2.) $Oracle_Home\j2ee\home\application-deployments\orabpel\ ejb_ob_engine\orion-ejb-jar.xml:
change the transaction-timeout parameter t2, t2<t1
3.) BPELConsole:
Change the syncMaxWaitTime in all domains, where you need a bigger timeout
4.) OPMNCTL:
restart the application server
Now you can write synchronous BPEL processes without getting this timeout error after 45 seconds. But be careful! You will block threads by using long-running synchronous invokes. And if many of this processes are invoked, this can stall your BPEL engine ...