Examples of InvalidTransactionException


Examples of javax.transaction.InvalidTransactionException

        setTransactionalTransactionOperationsManger(true);
        try {
            if (getTransactionManager().getTransaction() != null)
                throw new TransactionalException(
                        "InvalidTransactionException thrown from TxType.NEVER transactional interceptor.",
                        new InvalidTransactionException("Managed bean with Transactional annotation and TxType of NEVER " +
                                "called inside a transaction context"));
            return proceed(ctx);
        } finally {
            resetTransactionOperationsManager();
        }
View Full Code Here

Examples of javax.transaction.InvalidTransactionException

    public void resume(Transaction tx) throws IllegalStateException, InvalidTransactionException, SystemException {
        if (threadTx.get() != null) {
            throw new IllegalStateException("Transaction already associated with current thread");
        }
        if (tx instanceof TransactionImpl == false) {
            throw new InvalidTransactionException("Cannot resume foreign transaction: " + tx);
        }
        threadTx.set(tx);
        ((TransactionImpl)tx).setCurrentThread(Thread.currentThread());
    }
View Full Code Here

Examples of javax.transaction.InvalidTransactionException

            TransactionRequiredException transactionRequiredException = new TransactionRequiredException(ex.getMessage());
            transactionRequiredException.detail = ex;
            return transactionRequiredException;
        }
        if (ex instanceof INVALID_TRANSACTION) {
            InvalidTransactionException invalidTransactionException = new InvalidTransactionException(ex.getMessage());
            invalidTransactionException.detail = ex;
            return invalidTransactionException;
        }
        if (ex instanceof OBJECT_NOT_EXIST) {
            NoSuchObjectException noSuchObjectException = new NoSuchObjectException(ex.getMessage());
View Full Code Here

Examples of javax.transaction.InvalidTransactionException

            IllegalStateException, SystemException
    {
        if ( tobj == null || !(tobj instanceof TransactionImp) ) {
          String msg = "The specified transaction object is invalid for this configuration: " + tobj;
          LOGGER.logWarning( msg );
            throw new InvalidTransactionException ( msg );
        }

        TransactionImp tximp = (TransactionImp) tobj;
        try {
            compositeTransactionManager.resume ( tximp.getCT () );
View Full Code Here

Examples of javax.transaction.InvalidTransactionException

    public void resume(Transaction tx) throws IllegalStateException, InvalidTransactionException, SystemException {
        if (threadTx.get() != null) {
            throw new IllegalStateException("Transaction already associated with current thread");
        }
        if (tx instanceof TransactionImpl == false) {
            throw new InvalidTransactionException("Cannot resume foreign transaction: " + tx);
        }
        threadTx.set(tx);
    }
View Full Code Here

Examples of javax.transaction.InvalidTransactionException

    public void resume(Transaction tx) throws IllegalStateException, InvalidTransactionException, SystemException {
        if (threadTx.get() != null) {
            throw new IllegalStateException("Transaction already associated with current thread");
        }
        if (tx instanceof TransactionProxy == false) {
            throw new InvalidTransactionException("Cannot resume foreign transaction: " + tx);
        }
        threadTx.set(tx);
    }
View Full Code Here

Examples of javax.transaction.InvalidTransactionException

    public void resume(Transaction tx) throws IllegalStateException, InvalidTransactionException, SystemException {
        if (threadTx.get() != null) {
            throw new IllegalStateException("Transaction already associated with current thread");
        }
        if (tx instanceof TransactionImpl == false) {
            throw new InvalidTransactionException("Cannot resume foreign transaction: " + tx);
        }
        threadTx.set(tx);
    }
View Full Code Here

Examples of javax.transaction.InvalidTransactionException

        return threadTransaction.get();
    }

    public void resume(Transaction tx) throws InvalidTransactionException {
        if (tx == null) {
            throw new InvalidTransactionException("Transaction is null");
        }
        if (!(tx instanceof MyTransaction)) {
            throw new InvalidTransactionException("Unknown transaction type " + tx.getClass().getName());
        }
        MyTransaction myTransaction = (MyTransaction) tx;

        if (threadTransaction.get() != null) {
            throw new IllegalStateException("A transaction is already active");
        }

        int status = myTransaction.getStatus();
        if (status != Status.STATUS_ACTIVE && status != Status.STATUS_MARKED_ROLLBACK) {
            throw new InvalidTransactionException("Expected transaction to be STATUS_ACTIVE or STATUS_MARKED_ROLLBACK, but was " + status);
        }

        threadTransaction.set(myTransaction);
    }
View Full Code Here

Examples of javax.transaction.InvalidTransactionException

/*     */       {
/* 114 */         TransactionImple theTransaction = (TransactionImple)which;
/*     */         try
/*     */         {
/* 118 */           if (!AtomicAction.resume(theTransaction.getAtomicAction())) {
/* 119 */             throw new InvalidTransactionException();
/*     */           }
/* 121 */           theTransaction = null;
/*     */         }
/*     */         catch (Exception e2)
/*     */         {
/* 125 */           throw new SystemException();
/*     */         }
/*     */       }
/*     */       else {
/* 129 */         throw new InvalidTransactionException("Illegal type is: " + which);
/*     */       }
/*     */     }
/*     */   }
View Full Code Here

Examples of javax.transaction.InvalidTransactionException

        if(currentTxId != txId)
        {
            suspendCurrentTransaction();
            Transaction tx = txIdToTxMap.get(txId);
            if (tx == null) {
                throw new InvalidTransactionException("No transaction with id "
                        + txId + " found.");
            }
            tm.resume(tx);
            currentTxId = txId;
        }
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.