Package org.apache.geronimo.transaction.context

Examples of org.apache.geronimo.transaction.context.BeanTransactionContext


    public void commit() throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException, RollbackException, SecurityException, SystemException {
        TransactionContext ctx = transactionContextManager.getContext();
        if (ctx instanceof BeanTransactionContext == false) {
            throw new IllegalStateException("Transaction has not been started");
        }
        BeanTransactionContext beanContext = (BeanTransactionContext) ctx;
        try {
            beanContext.commit();
        } finally {
            UnspecifiedTransactionContext oldContext = beanContext.getOldContext();
            transactionContextManager.setContext(oldContext);
            oldContext.resume();
        }
    }
View Full Code Here


    public void rollback() throws IllegalStateException, SecurityException, SystemException {
        TransactionContext ctx = transactionContextManager.getContext();
        if (ctx instanceof BeanTransactionContext == false) {
            throw new IllegalStateException("Transaction has not been started");
        }
        BeanTransactionContext beanContext = (BeanTransactionContext) ctx;
        try {
            beanContext.rollback();
        } finally {
            UnspecifiedTransactionContext oldContext = beanContext.getOldContext();
            transactionContextManager.setContext(oldContext);
            oldContext.resume();
        }
    }
View Full Code Here

        public void commit() throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException, RollbackException, SecurityException, SystemException {
            TransactionContext ctx = transactionContextManager.getContext();
            if (ctx instanceof BeanTransactionContext == false) {
                throw new IllegalStateException("Transaction has not been started");
            }
            BeanTransactionContext beanContext = (BeanTransactionContext) ctx;
            try {
                beanContext.commit();
            } finally {
                UnspecifiedTransactionContext oldContext = beanContext.getOldContext();
                transactionContextManager.setContext(oldContext);
                oldContext.resume();
            }
        }
View Full Code Here

        public void rollback() throws IllegalStateException, SecurityException, SystemException {
            TransactionContext ctx = transactionContextManager.getContext();
            if (ctx instanceof BeanTransactionContext == false) {
                throw new IllegalStateException("Transaction has not been started");
            }
            BeanTransactionContext beanContext = (BeanTransactionContext) ctx;
            try {
                beanContext.rollback();
            } finally {
                UnspecifiedTransactionContext oldContext = beanContext.getOldContext();
                transactionContextManager.setContext(oldContext);
                oldContext.resume();
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.transaction.context.BeanTransactionContext

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.