cancel
Showing results for 
Search instead for 
Did you mean: 

transaction scope when accessing ABAP from Java ?

Former Member
0 Kudos

When I go from the J2EE platform to the ABAP platform:

what is the scope of a transaction I started on the

J2EE side ? In other words, does the transactional context

carry over from the J2EE platform to the ABAP platform, and

if so, can I do distributed J2EE transactions as well ?

In other words, does the JCo support local and/or

distributed J2EE transactions ?

thanks,

Matthias

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Matthias,

Generally, the R/3 system does not support distributed transactions.

I'm not sure which version of SAP Web AS you use, but for Web AS 6.40 there is also a JCA-based resource adapter (SAP JRA), which enables you to connect to ABAP platform from Java using the standard JCA API. Although SAP JRA itself does not support distributed transactions, you can use it in such as long as you do not access other systems with local transaction support in the same transaction. Maybe the following sections from the Web AS documentation will help you:

http://help.sap.com/saphelp_nw04/helpdata/en/7a/8fc1017281451f964593596902ca04/frameset.htm (on transactions and resource handling)

and

http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5caa85b11d6b28500508b5d5211/frameset.htm (on SAP Java Resource Adapter)

Best regards,

Zornitsa

Former Member
0 Kudos

Hi Zornitsa,

thanks for the answer, and especially the SAP JRA hint.

I'm OK about JRA not supporting distributed transactions, and I'm OK about not accessing other systems within a local transaction, but, for clarification, do I understand you right that I am able to do the below with Web AS 6.40 (pseudo code):

1: class CustomerManager implements SessionBean

10:

11: }

That is, in line 8, the customer gets deleted from the R3 system (using JRA based access in line 7) ?

Matthias

Former Member
0 Kudos

Hi Matthias,

Yes, this should be possible with JRA. A problem would occur, if for example you try to read some data in the same transaction from another backend system that does not support XAResources (let's say SAPDB). But if you only access the R/3 system in the transaction, there shouldn't be a problem.

If you download the SAP JRA from the SAP Service Marketplace, you can also take a look at the examples, which are included in the ZIP file. I hope this will clarify the issue further.

Zornitsa