on 12-27-2015 1:53 PM
Hello Experts,
I'm trying to use transaction in my JCA code according to this example: http://help.sap.com/saphelp_nw70ehp1/helpdata/en/dd/1e044258bdd417e10000000a1550b0/content.htm
When I'm trying to get the LocalTranstion object (connection.getLocalTransaction().begin()), I get the following exception:
java.lang.UnsupportedOperationException: The SAP Connector does not supports transactions.
at com.sapportals.connectors.SAPCFConnector.connection.SAPCFConnectorConnection.getLocalTransaction(SAPCFConnectorConnection.java:176)
J2EE version is 7.01 SP16.
How can I use transaction from JCA code?
Regards,
Omri
You are mixing up several things here.
JCA - the J2EE Connector Architecture - is a specification, a standard Java Enterprise API which can be implemented by appropriate J2EE connectors. The JRA (SAP Java Resource Adapter) is one of those implementations and offers standard JCA compliant APIs for communicating with an SAP ERP back-end system.
So it's not a question of JRA or JCA! JRA is an implementation of the JCA specification. And JRA also supports the JTA specification (Java Transaction API) with some limitations. This is also the documentation that you have posted a link to.
When looking at your error message, the thing is that you do NOT use the JRA, but some other JCA compliant J2EE connector implementation: the SAPCFConnector. I don't know that much about this connector, I think the abbreviation stands for "SAP Connector Framework Connector" and is usually used in SAP Portal development environments together with appropriate code generators and such stuff. But obviously this connector does not support the JTA specification. At least this is what the error message says.
So if you really need to use the JTA, I think the SAPCFConnector is not an option then. If feasible, please use the JRA for SAP back-end system connectivity instead.
Best regards,
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Omri,
you already found the JRA online documemtation of release 7.01.
The basic APIs are the same for release 7.3/7.4 and 7.01. The JCA specification defines the API.
The main difference between JRA in release 7.0x and JRA in releases >= 7.10 is, that the first one only implements the JCA specification 1.0 whereas the latter one implements the JCA specification 1.5. That means that especially the capability of doing outbound Remote Function Calls (ABAP to Java) has been added. WIth the older JRA 7.0x you can only do inbound Remote Function Calls (Java to ABAP).
Best regards,
Stefan
Hi Stefan,
My problem is the "strange" configuration for JRA in older J2EE versions (deploy tool etc).
I guess that for my scenario the most simple solution is to wrap the ABAP function in a new function and call the COMMIT action from the wrapper function (in this way I'm calling only one function and transaction is not needed).
Regards,
Omri
After reviewing the link again it's related to JRA and not JCA (the API is very similar) but the question still stands: how to use transaction in JCA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.