Index: org/postgresql/xa/PGXAConnection.java
===================================================================
RCS file: /usr/local/cvsroot/pgjdbc/pgjdbc/org/postgresql/xa/PGXAConnection.java,v
retrieving revision 1.10
diff -c -r1.10 PGXAConnection.java
*** org/postgresql/xa/PGXAConnection.java	1 Dec 2006 11:53:02 -0000	1.10
--- org/postgresql/xa/PGXAConnection.java	17 Jun 2007 07:40:03 -0000
***************
*** 61,67 ****
  
      public Connection getConnection() throws SQLException
      {
!         return super.getConnection();
      }
  
      public XAResource getXAResource() {
--- 61,80 ----
  
      public Connection getConnection() throws SQLException
      {
!         Connection conn = super.getConnection();
! 
! 	// When we're outside an XA transaction, autocommit
! 	// is supposed to be true, per usual JDBC convention.
! 	// When an XA transaction is in progress, it should be
! 	// false.
! 
! 	// super.getConnection resets autocommit to true, so we
! 	// have to set it to false before handing the connection 
! 	// to the caller, if an XA transaction is active.
! 	if(state == STATE_ACTIVE)
! 	    conn.setAutoCommit(false);
! 
! 	return conn;
      }
  
      public XAResource getXAResource() {
