Skip to Content
0
Former Member
Apr 25, 2005 at 11:12 PM

Changing autocommit fails on database connection

73 Views

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