cancel
Showing results for 
Search instead for 
Did you mean: 

Connection Handling in JTA and Local Transactions - SAP Help

Former Member
0 Kudos


     This help document describes a scenario where a developer wants to access both an SAP R/3 and MaxDB systems in a single EJB transaction:

http://help.sap.com/saphelp_nwce10/helpdata/en/ce/32dfe352a04b5fb8a89b4f245fd93b/frameset.htm

For example, you may use a non-transactional resource if you want to access both an SAP R/3 system and MaxDB in a single transaction. Since the connections to both back-end systems are not XA-enabled, you must declare the resource reference to one of them as non-transactional to avoid having more than one resource with LocalTransaction support enlisted in the transaction.

     Sounds easy. Can someone please provide a working example of how this would be accomplished? Adding the <non-transactional/> tag to the <resource-ref> of my EJB's in my ejb-j2ee-engine.xml doesn't seem to make a bit of difference.

     I have a JDBC query and a R/3 BAPI I need to execute. I've been trying to use JMS XA transactions with my BAPI, but I just can't escape the 'two phase commit' exception.

     I am working with EJB 3.0 session beans, this project doesn't require persistence.If someone has a link to a SAP Help document that goes into just a bit more detail on what code goes where I would really appreciate it.

     Thanks for taking the time to read my post!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

OK, how about this? How does one "mark one of the SAP specific resources as an XA resource"?

Former Member
0 Kudos

Here's a way to get around the 2 phase commit barrier: Skip JMS and call the R/3 BAPI with JCO.