Package org.apache.geronimo.transaction.manager

Examples of org.apache.geronimo.transaction.manager.RecoverableTransactionManager


        public static boolean recover(final GenericResourceManager rm) throws IOException {
            if (isRecoverable(rm)) {
                final XAConnectionFactory connFactory = (XAConnectionFactory) rm.getConnectionFactory();

                RecoverableTransactionManager rtxManager = (RecoverableTransactionManager) rm.getTransactionManager();
                rtxManager.registerNamedXAResourceFactory(new NamedXAResourceFactory() {

                    public String getName() {
                        return rm.getResourceName();
                    }
View Full Code Here


                    ActiveMQConnectionFactory connFactory = (ActiveMQConnectionFactory) rm.getConnectionFactory();
                    ActiveMQConnection activeConn = (ActiveMQConnection)connFactory.createConnection();
                    ActiveMQSession session = (ActiveMQSession)activeConn.createSession(true, Session.SESSION_TRANSACTED);
                    NamedXAResource namedXaResource = new WrapperNamedXAResource(session.getTransactionContext(), rm.getResourceName());

                    RecoverableTransactionManager rtxManager = (RecoverableTransactionManager) rm.getTransactionManager();
                    rtxManager.recoverResourceManager(namedXaResource);
                    return true;
                } catch (JMSException e) {
                  throw IOExceptionSupport.create(e);
                }
            } else {
View Full Code Here

            classLoader = ClassLoader.getSystemClassLoader();
        }

        final TransactionSupport txSupport = createTransactionSupport();

        final RecoverableTransactionManager tm;
        if (transactionManager instanceof RecoverableTransactionManager) {
            tm = (RecoverableTransactionManager) transactionManager;
        } else {
            if (txSupport.isRecoverable()) {
                throw new OpenEJBRuntimeException("currently recoverable tx support (xa) needs a geronimo tx manager");
View Full Code Here

                    final ActiveMQConnectionFactory connFactory = (ActiveMQConnectionFactory) rm.getConnectionFactory();
                    ActiveMQConnection activeConn = (ActiveMQConnection)connFactory.createConnection();
                    final ActiveMQSession session = (ActiveMQSession)activeConn.createSession(true, Session.SESSION_TRANSACTED);
                    NamedXAResource namedXaResource = new WrapperNamedXAResource(session.getTransactionContext(), rm.getResourceName());

                    RecoverableTransactionManager rtxManager = (RecoverableTransactionManager) rm.getTransactionManager();
                    rtxManager.registerNamedXAResourceFactory(new NamedXAResourceFactory() {

                        @Override
                        public String getName() {
                            return rm.getResourceName();
                        }
View Full Code Here

                    ActiveMQConnectionFactory connFactory = (ActiveMQConnectionFactory) rm.getConnectionFactory();
                    ActiveMQConnection activeConn = (ActiveMQConnection)connFactory.createConnection();
                    ActiveMQSession session = (ActiveMQSession)activeConn.createSession(true, Session.SESSION_TRANSACTED);
                    NamedXAResource namedXaResource = new WrapperNamedXAResource(session.getTransactionContext(), rm.getResourceName());

                    RecoverableTransactionManager rtxManager = (RecoverableTransactionManager) rm.getTransactionManager();
                    rtxManager.recoverResourceManager(namedXaResource);
                    return true;
                } catch (JMSException e) {
                  throw IOExceptionSupport.create(e);
                }
            } else {
View Full Code Here

        public static boolean recover(final GenericResourceManager rm) throws IOException {
            if (isRecoverable(rm)) {
                final XADataSource dataSource = (XADataSource) rm.getDataSource();

                RecoverableTransactionManager rtxManager = (RecoverableTransactionManager) rm.getTransactionManager();
                rtxManager.registerNamedXAResourceFactory(new NamedXAResourceFactory() {

                    public String getName() {
                        return rm.getResourceName();
                    }
View Full Code Here

        if (classLoader == null) classLoader = getClass().getClassLoader();
        if (classLoader == null) classLoader = ClassLoader.getSystemClassLoader();

        TransactionSupport txSupport = createTransactionSupport();

        RecoverableTransactionManager tm;
        if (transactionManager instanceof RecoverableTransactionManager) {
            tm = (RecoverableTransactionManager) transactionManager;
        } else {
            if (txSupport.isRecoverable()) {
                throw new OpenEJBRuntimeException("currently recoverable tx support (xa) needs a geronimo tx manager");
View Full Code Here

            classLoader = ClassLoader.getSystemClassLoader();
        }

        final TransactionSupport txSupport = createTransactionSupport();

        final RecoverableTransactionManager tm;
        if (transactionManager instanceof RecoverableTransactionManager) {
            tm = (RecoverableTransactionManager) transactionManager;
        } else {
            if (txSupport.isRecoverable()) {
                throw new OpenEJBRuntimeException("currently recoverable tx support (xa) needs a geronimo tx manager");
View Full Code Here

        public static boolean recover(final GenericResourceManager rm) throws IOException {
            if (isRecoverable(rm)) {
                final XAConnectionFactory connFactory = (XAConnectionFactory) rm.getConnectionFactory();

                RecoverableTransactionManager rtxManager = (RecoverableTransactionManager) rm.getTransactionManager();
                rtxManager.registerNamedXAResourceFactory(new NamedXAResourceFactory() {

                    @Override
                    public String getName() {
                        return rm.getResourceName();
                    }
View Full Code Here

                ActiveMQConnectionFactory connFactory = (ActiveMQConnectionFactory) rm.getConnectionFactory();
                ActiveMQConnection activeConn = (ActiveMQConnection)connFactory.createConnection();
                ActiveMQSession session = (ActiveMQSession)activeConn.createSession(true, Session.SESSION_TRANSACTED);
                NamedXAResource namedXaResource = new WrapperNamedXAResource(session.getTransactionContext(), rm.getResourceName());

                RecoverableTransactionManager rtxManager = (RecoverableTransactionManager) rm.getTransactionManager();
                rtxManager.recoverResourceManager(namedXaResource);
                return true;
            } catch (JMSException e) {
              throw IOExceptionSupport.create(e);
            }
        } else {
View Full Code Here

TOP

Related Classes of org.apache.geronimo.transaction.manager.RecoverableTransactionManager

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.