Package org.apache.geronimo.transaction.manager

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


    public void setUp() throws Exception {
        super.setUp();


        // setup tx mgr
        transactionManager = new GeronimoTransactionManager();
        SystemInstance.get().setComponent(TransactionSynchronizationRegistry.class, transactionManager);

        // setup naming
        MockInitialContextFactory.install(Collections.singletonMap("java:comp/TransactionSynchronizationRegistry", transactionManager));
        assertSame(transactionManager, new InitialContext().lookup("java:comp/TransactionSynchronizationRegistry"));
View Full Code Here


            }

            // WorkManager: the resource adapter can use this to dispatch messages or perform tasks
            final WorkManager workManager;
            if (GeronimoTransactionManager.class.isInstance(transactionManager)) {
                final GeronimoTransactionManager geronimoTransactionManager = (GeronimoTransactionManager) transactionManager;
                final TransactionContextHandler txWorkContextHandler = new TransactionContextHandler(geronimoTransactionManager);

                // use id as default realm name if realm is not specified in service properties
                final String securityRealmName = getStringProperty(serviceInfo.properties, "realm", serviceInfo.id);
View Full Code Here

                    xidFactory,
                    SystemInstance.get().getBase().getDirectory("."));
            ((HOWLLog)txLog).doStart();
        }

        final GeronimoTransactionManager geronimoTransactionManager = new GeronimoTransactionManager(defaultTransactionTimeoutSeconds, xidFactory, txLog);
        final ObjectNameBuilder jmxName = new ObjectNameBuilder("openejb.management")
                .set("j2eeType", "TransactionManager");
        LocalMBeanServer.registerDynamicWrapperSilently(
                new TransactionManagerMBean(geronimoTransactionManager, defaultTransactionTimeout, txLog),
                jmxName.build());
View Full Code Here

            }

            // WorkManager: the resource adapter can use this to dispatch messages or perform tasks
            final WorkManager workManager;
            if (GeronimoTransactionManager.class.isInstance(transactionManager)) {
                final GeronimoTransactionManager geronimoTransactionManager = (GeronimoTransactionManager) transactionManager;
                final TransactionContextHandler txWorkContextHandler = new TransactionContextHandler(geronimoTransactionManager);

                // use id as default realm name if realm is not specified in service properties
                final String securityRealmName = getStringProperty(serviceInfo.properties, "realm", serviceInfo.id);
View Full Code Here

    private GeronimoTransactionManager tm;
    private String persistenceUnit = "foo";
    private MockEntityManagerFactory entityManagerFactory;

    protected void setUp() throws Exception {
        tm = new GeronimoTransactionManager();
        tm.addTransactionAssociationListener(new TransactionListener());
        entityManagerFactory = new MockEntityManagerFactory();
    }
View Full Code Here

/**
* @version $Rev: 476049 $ $Date: 2006-11-17 12:35:17 +0800 (Fri, 17 Nov 2006) $
*/
public class TransactionalThreadPooledTimerTest extends AbstractThreadPooledTimerTest {
    protected void setUp() throws Exception {
        this.transactionManager = new GeronimoTransactionManager();
        executableWorkFactory = new TransactionalExecutorTaskFactory(this.transactionManager, 1);
        super.setUp();
    }
View Full Code Here

* @version $Rev: 476049 $ $Date: 2006-11-17 12:35:17 +0800 (Fri, 17 Nov 2006) $
*/
public class NontransactionalThreadPooledTimerTest extends AbstractThreadPooledTimerTest {

    protected void setUp() throws Exception {
        this.transactionManager = new GeronimoTransactionManager();
        executableWorkFactory = new NontransactionalExecutorTaskFactory();
        super.setUp();
    }
View Full Code Here

        Bus bus = BusFactory.newInstance().createBus();
        ConfiguredBeanLocator cbl = bus.getExtension(ConfiguredBeanLocator.class);
        MyBeanLocator mybl = new MyBeanLocator(cbl);
        bus.setExtension(mybl, ConfiguredBeanLocator.class);

        TransactionManager tmExpected = new GeronimoTransactionManager();
        mybl.register("tm", tmExpected);
        tmByName(bus, tmExpected);
        tmByClass(bus, tmExpected);
    }
View Full Code Here

    private static final String FAILFIRST = "failfirst";
    private static final String OK = "ok";

    @Test
    public void testWithJTA() throws JMSException, XAException, InterruptedException {
        TransactionManager transactionManager = new GeronimoTransactionManager();
        Connection connection = createXAConnection("brokerJTA", transactionManager);
        Queue dest = JMSUtil.createQueue(connection, "test");

        MessageListener listenerHandler = new TestMessageListener();
        PollingMessageListenerContainer container = new PollingMessageListenerContainer(connection, dest,
View Full Code Here

            }

            // WorkManager: the resource adapter can use this to dispatch messages or perform tasks
            final WorkManager workManager;
            if (GeronimoTransactionManager.class.isInstance(transactionManager)) {
                final GeronimoTransactionManager geronimoTransactionManager = (GeronimoTransactionManager) transactionManager;
                final TransactionContextHandler txWorkContextHandler = new TransactionContextHandler(geronimoTransactionManager);

                // use id as default realm name if realm is not specified in service properties
                final String securityRealmName = getStringProperty(serviceInfo.properties, "realm", serviceInfo.id);
View Full Code Here

TOP

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

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.