Package org.apache.geronimo.transaction.manager

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


            }

            // 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


        try {
            try {
                transactionManager = new SpringTransactionManagerCreator().create(transactionTimeout, xidFactory, transactionLog);
                useSpring = true;
            } catch (NoClassDefFoundError e) {
                transactionManager = new GeronimoTransactionManager(transactionTimeout, xidFactory, transactionLog);
            }
        } catch (XAException e) {
            throw new RuntimeException("Error recovering transaction log", e);
        }
    }
View Full Code Here

                            flushSleepTimeMilliseconds, logFileDir, logFileExt, logFileName, maxBlocksPerFile,
                            maxBuffers, maxLogFiles, minBuffers, threadsWaitingForceThreshold, xidFactory,
                            serverBaseDir);

            howlLog.doStart();
            transactionManager = new GeronimoTransactionManager(1200, xidFactory, howlLog);
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }
    }
View Full Code Here

    private GeronimoTransactionManager geronimoTransactionManager;
    private XidFactory xidFactory = new XidFactoryImpl("geronimo.test.tm".getBytes());

    protected void setUp() throws Exception {
        super.setUp();
        geronimoTransactionManager = new GeronimoTransactionManager();
    }
View Full Code Here

    /**
     * Tests get and set work manager
     */
    public void testGetSetWorkManager() throws Exception {
        GeronimoTransactionManager transactionManager = new GeronimoTransactionManager();
        GeronimoWorkManager manager = new GeronimoWorkManager(pool, pool, pool, transactionManager);
        GeronimoBootstrapContext context = new GeronimoBootstrapContext(manager, transactionManager);
        WorkManager wm = context.getWorkManager();

        assertSame("Make sure it is the same object", manager, wm);
View Full Code Here

    /**
     * Tests get and set XATerminator
     */
    public void testGetSetXATerminator() throws Exception {
        GeronimoTransactionManager transactionManager = new GeronimoTransactionManager();
        GeronimoWorkManager manager = new GeronimoWorkManager(pool, pool, pool, transactionManager);
        GeronimoBootstrapContext context = new GeronimoBootstrapContext(manager, transactionManager);
        XATerminator xat = context.getXATerminator();

        assertSame("Make sure it is the same object", transactionManager, xat);
View Full Code Here

    private GeronimoWorkManager workManager;

    protected void setUp() throws Exception {
        super.setUp();
       
        XAWork xaWork = new GeronimoTransactionManager();
        ThreadPool pool = new ThreadPool(1, "Connector Test", 30000, ThreadPool.class.getClassLoader(), "foo:test=bar");
        pool.setWaitWhenBlocked(true);
       
        workManager = new GeronimoWorkManager(pool, pool, pool, xaWork);
        workManager.doStart();
View Full Code Here

        // bind UserTransaction and TransactionManager to JNDI
        try {
            InitialContext ic = new InitialContext();
            // TODO: for some reason this is not working, throwing an error: java.lang.IllegalArgumentException: RegistryContext: object to bind must be Remote, Reference, or Referenceable
            ic.rebind("java:comp/UserTransaction", new GeronimoTransactionManager());
        } catch (Exception e) {
            throw new ContainerException("Unable to bind UserTransaction/TransactionManager to JNDI", e);
        }

        // check JNDI
View Full Code Here

    @Override
    protected void setUp() throws Exception {
        super.setUp();

        // create a transaction manager
        final GeronimoTransactionManager transactionManager = new GeronimoTransactionManager();

        // create the ActiveMQ resource adapter instance
        ra = new ActiveMQResourceAdapter();

        // initialize properties
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.