Hi,

I am trying to use a Managed Transaction from my java class as below,

conn.setAutoCommit(false);

The above line is throwing the exception,

[STDOUT]  java.sql.SQLException: You cannot set autocommit during a managed 
transaction!
[STDOUT]  at 
org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.setJdbcAutoCommitBaseWrapperManagedConnection.java:46
[STDOUT]  at 
org.jboss.resource.adapter.jdbc.WrappedConnection.setAutoCommit(WrappedConnection.java:432)


Kindly let me know how to manage the setAutoCommit with true/false values from 
my java class.

I am using jboss-4.0.2 and also I have connection pool xml file contents as 
below,
<local-tx-datasource>
<connection-url>jdbc:oracle:thin:@172.16.1.71:1521:ttk</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>appln</user-name>
appln
</local-tx-datasource>


Can we use setAutoCommit(false) in <local-tx-datasource> ?

Please advice.



regards,

Nagaraj

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3902844#3902844

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3902844


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to