Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JTA & BPEL

468628Apr 19 2006 — edited Apr 20 2006
I'm having some problems managing transactions from a BPEL process. I've created a session bean that is used to invoke stored procedures in a SQL Server database. This session bean is accessed from BPEL via WSIF. We've tested this a bit and everything seems to work fine.

Now, we are attempting to add error handling to our processes. My preference is to share the BPEL processes' context with the session bean so BPEL can manage the transactions.

I've tested this approach outside of BPEL- I created a servlet that does something like this-
Object o = new InitialContext().lookup("java:comp/UserTransaction");
UserTransaction ut = (UserTransaction)o;
ut.begin();
//now get session bean and call sprocs
ut.commit();

From the servlet, this seems to work fine so long as the 'trans-attribute' of my session bean is 'Mandatory'. It seems to commit or rollback appropriately based on the method called on the user transaction.

I'm trying to get it to work similarly from BPEL. When the trans-attribute is mandatory in the session bean I get 'javax.transaction.TransactionRequiredException: Transaction can not be null'. I've tried this both from embedding and from WSIF with the same result. When the trans-attribute is 'Required' the transactions are always committed, even when I throw a fault.

Am I missing some setting in the BPEL process/domain for JTA? This is possible right?

Thanks for the help,
Mike
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 18 2006
Added on Apr 19 2006
7 comments
723 views