Package javax.transaction

Examples of javax.transaction.RollbackException.initCause()


            if (e.errorCode >= XAException.XA_RBBASE &&
                    e.errorCode <= XAException.XA_RBEND) {
                RollbackException re = new RollbackException(
                        "Transaction rolled back: XA_ERR=" + e.errorCode);
                re.initCause(e.getCause());
                throw re;
            } else {
                SystemException se = new SystemException(
                        "Unable to commit transaction: XA_ERR=" + e.errorCode);
                se.initCause(e.getCause());
View Full Code Here


            if (e.errorCode >= XAException.XA_RBBASE &&
                    e.errorCode <= XAException.XA_RBEND) {
                RollbackException re = new RollbackException(
                        "Transaction rolled back: XA_ERR=" + e.errorCode);
                re.initCause(e.getCause());
                throw re;
            } else {
                SystemException se = new SystemException(
                        "Unable to commit transaction: XA_ERR=" + e.errorCode);
                se.initCause(e.getCause());
View Full Code Here

            if (e.errorCode >= XAException.XA_RBBASE &&
                    e.errorCode <= XAException.XA_RBEND) {
                RollbackException re = new RollbackException(
                        "Transaction rolled back: XA_ERR=" + e.errorCode);
                re.initCause(e.getCause());
                throw re;
            } else {
                SystemException se = new SystemException(
                        "Unable to commit transaction: XA_ERR=" + e.errorCode);
                se.initCause(e.getCause());
View Full Code Here

        RollbackException rollbackException = new RollbackException(
            jtaLogger.logMesg
                .getString("com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted"));
        if (_theTransaction.getDeferredThrowable() != null)
        {
          rollbackException.initCause(_theTransaction
              .getDeferredThrowable());
        }
        throw rollbackException;
      default:
        throw new IllegalStateException(
View Full Code Here

          case ActionStatus.H_ROLLBACK:
          case ActionStatus.ABORTED:
          case ActionStatus.ABORTING:
            RollbackException rollbackException = new RollbackException(jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted"));
            if(_theTransaction.getDeferredThrowable() != null) {
              rollbackException.initCause(_theTransaction.getDeferredThrowable());
            }
            throw rollbackException;
          default:
            throw new IllegalStateException(
                jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.invalidstate"));
View Full Code Here

      catch (TRANSACTION_ROLLEDBACK e4)
      {
        RollbackException rollbackException = new RollbackException(e4.toString());
                if(_rollbackOnlyCallerStacktrace != null) {
                    // we rolled back beacuse the user explicitly told us not to commit. Attach the trace of who did that for debug:
                    rollbackException.initCause(_rollbackOnlyCallerStacktrace);
                }
                throw rollbackException;
      }
      catch (org.omg.CORBA.NO_PERMISSION e5)
      {
View Full Code Here

        RollbackException rollbackException = new RollbackException(
            jtaLogger.logMesg
                .getString("com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted"));
        if (_theTransaction.getDeferredThrowable() != null)
        {
          rollbackException.initCause(_theTransaction
              .getDeferredThrowable());
        }
        throw rollbackException;
      default:
        throw new IllegalStateException(
View Full Code Here

          case ActionStatus.ABORTED:
          case ActionStatus.ABORTING:
                        RollbackException rollbackException = new RollbackException(jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted"));
                        if(_rollbackOnlyCallerStacktrace != null) {
                            // we rolled back beacuse the user explicitly told us not to commit. Attach the trace of who did that for debug:
                            rollbackException.initCause(_rollbackOnlyCallerStacktrace);
                        }
                        else if(_theTransaction.getDeferredThrowable() != null) {
                            // we tried to commit but it went wrong - attach the reason for debug:
              rollbackException.initCause(_theTransaction.getDeferredThrowable());
            }
View Full Code Here

                            // we rolled back beacuse the user explicitly told us not to commit. Attach the trace of who did that for debug:
                            rollbackException.initCause(_rollbackOnlyCallerStacktrace);
                        }
                        else if(_theTransaction.getDeferredThrowable() != null) {
                            // we tried to commit but it went wrong - attach the reason for debug:
              rollbackException.initCause(_theTransaction.getDeferredThrowable());
            }
            throw rollbackException;
          default:
            throw new InvalidTerminationStateException(
                jtaLogger.logMesg.getString("com.arjuna.ats.internal.jta.transaction.arjunacore.invalidstate"));
View Full Code Here

        RollbackException rollbackException = new RollbackException(
            jtaLogger.logMesg
                .getString("com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted"));
        if (_theTransaction.getDeferredThrowable() != null)
        {
          rollbackException.initCause(_theTransaction
              .getDeferredThrowable());
        }
        throw rollbackException;
      default:
        throw new IllegalStateException(
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.