User: mulder
Date: 00/06/07 16:04:14
Modified: src/main/org/jboss/minerva/xa XADataSourceImpl.java
Log:
Set auto-commit to false on JDBC1 connections created by the XA wrappers.
Revision Changes Path
1.2 +8 -1 jboss/src/main/org/jboss/minerva/xa/XADataSourceImpl.java
Index: XADataSourceImpl.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/minerva/xa/XADataSourceImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XADataSourceImpl.java 2000/06/02 13:48:48 1.1
+++ XADataSourceImpl.java 2000/06/07 23:04:14 1.2
@@ -18,7 +18,7 @@
* XAResource are responsible for closing the connection when appropriate.
* Note that the underlying driver may perform pooling, but need not. This
* class does not add any pooling capabilities.
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
* @author Aaron Mulder ([EMAIL PROTECTED])
*/
public class XADataSourceImpl implements XADataSource {
@@ -123,6 +123,13 @@
con = DriverManager.getConnection(url, properties);
else
con = DriverManager.getConnection(url);
+
+ try {
+ con.setAutoCommit(false);
+ } catch(SQLException e) {
+ if(logWriter != null)
+ logWriter.println("XADataSource unable to disable auto-commit on
"+con.getClass().getName());
+ }
XAResourceImpl res = new XAResourceImpl(con);
XAConnectionImpl xacon = new XAConnectionImpl(con, res);