Package javax.transaction

Examples of javax.transaction.InvalidTransactionException


       
        if (getTransaction() != null)
            throw new IllegalStateException();
       
        if (tobj == null)
            throw new InvalidTransactionException();
       
        bindings.put(Thread.currentThread(), tobj);
       
    }
View Full Code Here


            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 {
            ctm_.resume ( tximp.getCT () );
View Full Code Here

        Logger logger = Logger.getLogger(ctx.getTarget().getClass().getName());
        logger.info("In NEVER TransactionalInterceptor");
        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);
    }
View Full Code Here

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

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

        } else if (ex instanceof TRANSACTION_ROLLEDBACK) {
            RemoteException newEx = new TransactionRolledbackException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof INVALID_TRANSACTION) {
            RemoteException newEx = new InvalidTransactionException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof BAD_PARAM) {
            Exception inner = ex;
View Full Code Here

        Logger logger = Logger.getLogger(ctx.getTarget().getClass().getName());
        logger.info("In NEVER TransactionalInterceptor");
        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);
    }
View Full Code Here

        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

    public Object transactional(InvocationContext ctx) throws Exception {
        _logger.info("In NEVER TransactionalInterceptor");
        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);
    }
View Full Code Here

    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

            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

TOP

Related Classes of javax.transaction.InvalidTransactionException

Copyright © 2018 www.massapicom. 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.