protected boolean allowLocalCommitRollback_() { if (getXAState() == XA_T0_NOT_ASSOCIATED) { return true; } return false; }
protected boolean allowLocalCommitRollback_() { if (getXAState() == XA_T0_NOT_ASSOCIATED) { return true; } return false; }
public boolean willAutoCommitGenerateFlow() { // this logic must be in sync with writeCommit() logic if (!autoCommit_) { return false; } if (!isXAConnection_) { return true; } boolean doCommit = false; int xaState = getXAState(); if (xaState == XA_T0_NOT_ASSOCIATED) { doCommit = true; } return doCommit; }
public boolean willAutoCommitGenerateFlow() { // this logic must be in sync with writeCommit() logic if (!autoCommit_) { return false; } if (!isXAConnection_) { return true; } boolean doCommit = false; int xaState = getXAState(); if (xaState == XA_T0_NOT_ASSOCIATED) { doCommit = true; } return doCommit; }
public void writeCommit() throws SqlException { // this logic must be in sync with willAutoCommitGenerateFlow() logic int xaState = netCon.getXAState(); if (xaState == netCon.XA_T0_NOT_ASSOCIATED){ netCon.xares_.callInfoArray_[ netCon.xares_.conn_.currXACallInfoOffset_ ].xid_ = NetXAResource.nullXid; writeLocalXACommit_(); } }
public void writeCommit() throws SqlException { // this logic must be in sync with willAutoCommitGenerateFlow() logic int xaState = netCon.getXAState(); if (xaState == netCon.XA_T0_NOT_ASSOCIATED){ netCon.xares_.callInfoArray_[ netCon.xares_.conn_.currXACallInfoOffset_ ].xid_ = NetXAResource.nullXid; writeLocalXACommit_(); } }
public void writeTransactionStart(Statement statement) throws SqlException { //KATHEY remove below after checking that we don't need it. if (!netCon.isXAConnection()) { return; // not a XA connection } // this is a XA connection int xaState = netCon.getXAState(); netCon.xares_.exceptionsOnXA = null; //TODO: Looks like this can go and also the whole client indoubtTransaction code. /* if (xaState == XA_RECOVER) { // in recover, clean up and go to open-idle if (indoubtTransactions_ != null) { indoubtTransactions_.clear(); indoubtTransactions_ = null; setXAState(XA_OPEN_IDLE); xaState = XA_OPEN_IDLE; } }*/ // For derby we don't need to write transaction start for a local //transaction. If autocommit is off we are good to go. return; }
public void writeTransactionStart(Statement statement) throws SqlException { //KATHEY remove below after checking that we don't need it. if (!netCon.isXAConnection()) { return; // not a XA connection } // this is a XA connection int xaState = netCon.getXAState(); netCon.xares_.exceptionsOnXA = null; //TODO: Looks like this can go and also the whole client indoubtTransaction code. /* if (xaState == XA_RECOVER) { // in recover, clean up and go to open-idle if (indoubtTransactions_ != null) { indoubtTransactions_.clear(); indoubtTransactions_ = null; setXAState(XA_OPEN_IDLE); xaState = XA_OPEN_IDLE; } }*/ // For derby we don't need to write transaction start for a local //transaction. If autocommit is off we are good to go. return; }
public void readCommit() throws SqlException { int xaState = netCon.getXAState(); NetXACallInfo callInfo = netCon.xares_.callInfoArray_ [netCon.currXACallInfoOffset_]; callInfo.xaRetVal_ = XAResource.XA_OK; // initialize XARETVAL if (xaState == netCon.XA_T0_NOT_ASSOCIATED) { readLocalXACommit_(); //TODO: Remove //setXAState(XA_LOCAL); } if (callInfo.xaRetVal_ != XAResource.XA_OK) { // xaRetVal has possible error, format it callInfo.xaFunction_ = NetXAResource.XAFUNC_COMMIT; netCon.xares_.xaRetValErrorAccumSQL(callInfo, 0); callInfo.xaRetVal_ = XAResource.XA_OK; // re-initialize XARETVAL throw netCon.xares_.exceptionsOnXA; } }
public void readCommit() throws SqlException { int xaState = netCon.getXAState(); NetXACallInfo callInfo = netCon.xares_.callInfoArray_ [netCon.currXACallInfoOffset_]; callInfo.xaRetVal_ = XAResource.XA_OK; // initialize XARETVAL if (xaState == netCon.XA_T0_NOT_ASSOCIATED) { readLocalXACommit_(); //TODO: Remove //setXAState(XA_LOCAL); } if (callInfo.xaRetVal_ != XAResource.XA_OK) { // xaRetVal has possible error, format it callInfo.xaFunction_ = NetXAResource.XAFUNC_COMMIT; netCon.xares_.xaRetValErrorAccumSQL(callInfo, 0); callInfo.xaRetVal_ = XAResource.XA_OK; // re-initialize XARETVAL throw netCon.xares_.exceptionsOnXA; } }