Index: org/postgresql/xa/PGXAConnection.java =================================================================== RCS file: /usr/local/cvsroot/pgjdbc/pgjdbc/org/postgresql/xa/PGXAConnection.java,v retrieving revision 1.2 diff -c -r1.2 PGXAConnection.java *** org/postgresql/xa/PGXAConnection.java 29 Oct 2005 18:59:39 -0000 1.2 --- org/postgresql/xa/PGXAConnection.java 29 Oct 2005 19:05:09 -0000 *************** *** 172,178 **** throw new PGXAException(GT.tr("Prepare called before end"), XAException.XAER_INVAL); state = STATE_IDLE; ! currentXid = null; if (!conn.haveMinimumServerVersion("8.1")) throw new PGXAException(GT.tr("Server versions prior to 8.1 do not support two-phase commit."), XAException.XAER_RMERR); --- 172,178 ---- throw new PGXAException(GT.tr("Prepare called before end"), XAException.XAER_INVAL); state = STATE_IDLE; ! // currentXid = null; if (!conn.haveMinimumServerVersion("8.1")) throw new PGXAException(GT.tr("Server versions prior to 8.1 do not support two-phase commit."), XAException.XAER_RMERR); *************** *** 335,341 **** try { // Check preconditions ! if (currentXid == null || currentXid.equals(xid)) { // In fact, we don't know if xid is bogus, or if it just wasn't associated with this connection. // Assume it's our fault. --- 335,341 ---- try { // Check preconditions ! if (currentXid == null || !currentXid.equals(xid)) { // In fact, we don't know if xid is bogus, or if it just wasn't associated with this connection. // Assume it's our fault.