cancel
Showing results for 
Search instead for 
Did you mean: 

Changing autocommit fails on database connection

Former Member
0 Kudos
231

Hi,

I am using jdbc 2.0 with XA Transaction

My code is as follows

InitialContext ctx = new InitialContext();

DataSource ods = (DataSource) ctx.lookup("java:comp/env/jdbc/testDS");

Connection conn = ods.getConnection();

conn.setAutoCommit(false);

I am getting the follwoing exception when I am setting the

autocommit to false on the connection object

ResourceException occured in method

ConnectionHandle.setAutoCommit(): com.sap.engine.services.dbpool.exceptions.BaseResourceException: LocalTransaction not supported in XA transaction case

Any help is greatly appreciated!

Thanks

Kavitha

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If you want to set AutoCommit true or false you can do that at the JDBC Comm Channel level. You do not have to write explicit code. What is your objective in doing this?

Please check the Adapter first to see if transaction handling is supported.

What version of XI patch are you running??

Thanks

A

Former Member
0 Kudos

Hi Ashish,

We need to control it programmatically based on the scenario, that's why it has to be in the code.

I am new to SAP WEB AS. I am trying to port the existing

application to SAP Web Server.

The same issue was solved in Weblogic by adding

SupportsLocalTransaction="true" in the datasource configuration. Is there any SAP Web AS equivalent for this?

How can I check the Adapter for transaction support?

I am using Sneak Preview Edition of SAP Web Application Server Java 6.40.

How do I check for the XI Patch?

Thanks

Kavitha