public void prePrepare() throws Exception { // Is it ok to call prepare now given the state of the // transaction? switch (state) { case START_STATE: case IN_USE_STATE: break; default: XAException xae = newXAException("Prepare cannot be called now", XAException.XAER_PROTO); throw xae; } if (isRollbackOnly()) { XAException xae = newXAException("COMMIT FAILED: Transaction marked rollback only", XAException.XA_RBROLLBACK); TransactionRolledBackException transactionRolledBackException = new TransactionRolledBackException(xae.getLocalizedMessage()); transactionRolledBackException.initCause(rollackOnlyCause); xae.initCause(transactionRolledBackException); throw xae; } }
public void prePrepare() throws Exception { // Is it ok to call prepare now given the state of the // transaction? switch (state) { case START_STATE: case IN_USE_STATE: break; default: XAException xae = newXAException("Prepare cannot be called now", XAException.XAER_PROTO); throw xae; } if (isRollbackOnly()) { XAException xae = newXAException("COMMIT FAILED: Transaction marked rollback only", XAException.XA_RBROLLBACK); TransactionRolledBackException transactionRolledBackException = new TransactionRolledBackException(xae.getLocalizedMessage()); transactionRolledBackException.initCause(rollackOnlyCause); xae.initCause(transactionRolledBackException); throw xae; } }
public void prePrepare() throws Exception { // Is it ok to call prepare now given the state of the // transaction? switch (state) { case START_STATE: case IN_USE_STATE: break; default: XAException xae = newXAException("Prepare cannot be called now", XAException.XAER_PROTO); throw xae; } if (isRollbackOnly()) { XAException xae = newXAException("COMMIT FAILED: Transaction marked rollback only", XAException.XA_RBROLLBACK); TransactionRolledBackException transactionRolledBackException = new TransactionRolledBackException(xae.getLocalizedMessage()); transactionRolledBackException.initCause(rollackOnlyCause); xae.initCause(transactionRolledBackException); throw xae; } }
public void prePrepare() throws Exception { // Is it ok to call prepare now given the state of the // transaction? switch (state) { case START_STATE: case IN_USE_STATE: break; default: XAException xae = newXAException("Prepare cannot be called now", XAException.XAER_PROTO); throw xae; } if (isRollbackOnly()) { XAException xae = newXAException("COMMIT FAILED: Transaction marked rollback only", XAException.XA_RBROLLBACK); TransactionRolledBackException transactionRolledBackException = new TransactionRolledBackException(xae.getLocalizedMessage()); transactionRolledBackException.initCause(rollackOnlyCause); xae.initCause(transactionRolledBackException); throw xae; } }