Package javax.transaction

Examples of javax.transaction.RollbackException.initCause()


        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

            if (status == Status.STATUS_MARKED_ROLLBACK) {
                rollbackResources(resourceManagers, false);
                RollbackException rollbackException = new RollbackException("Unable to commit: transaction marked for rollback");
                if (markRollbackCause != null) {
                    rollbackException.initCause(markRollbackCause);
                }
                throw rollbackException;
            }
            synchronized (this) {
                if (status == Status.STATUS_ACTIVE) {
View Full Code Here

        setRollbackOnly(e);

        rollbackInt();

        RollbackException newException = new RollbackException(e.toString());
        newException.initCause(e);

        throw newException;
      }

      if (_status == Status.STATUS_MARKED_ROLLBACK) {
View Full Code Here

          sync.beforeCompletion();
        } catch (RuntimeException e) {
          setRollbackOnly(e);

          RollbackException newException = new RollbackException(e.toString());
          newException.initCause(e);

          throw newException;
        } catch (Throwable e) {
          log.log(Level.FINE, e.toString(), e);
        }
View Full Code Here

          sync.beforeCompletion();
        } catch (RuntimeException e) {
          setRollbackOnly(e);

          RollbackException newException = new RollbackException(e.toString());
          newException.initCause(e);

          throw newException;
        } catch (Throwable e) {
          log.log(Level.FINE, e.toString(), e);
        }
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

            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

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.