Package org.apache.geronimo.transaction.manager

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


        // create reference to openejb itests
        File file = new File(System.getProperty("user.home") + "/.m2/repository/org/apache/openejb/openejb-itests-beans/3.0-incubating-SNAPSHOT/openejb-itests-beans-3.0-incubating-SNAPSHOT.jar");
        if (!file.canRead()) return;
        JarFile moduleFile = new JarFile(file);

        TransactionManager transactionManager = new GeronimoTransactionManager();
        OpenEjbSystem openEjbSystem = new OpenEjbSystemGBean(transactionManager);

        addEjbContainer(openEjbSystem, "Default Stateless Container", "STATELESS");
        addEjbContainer(openEjbSystem, "Default Stateful Container", "STATEFUL");
        addEjbContainer(openEjbSystem, "Default BMP Container", "BMP_ENTITY");
View Full Code Here


            }

            // WorkManager: the resource adapter can use this to dispatch messages or perform tasks
            WorkManager workManager;
            if (transactionManager instanceof GeronimoTransactionManager) {
                GeronimoTransactionManager geronimoTransactionManager = (GeronimoTransactionManager) transactionManager;
                workManager = new GeronimoWorkManager(threadPool, threadPool, threadPool, geronimoTransactionManager);
            } else {
                workManager = new SimpleWorkManager(threadPool);
            }
View Full Code Here

            // resource adapters only work with a geronimo transaction manager
            if (!(transactionManager instanceof GeronimoTransactionManager)) {
                throw new OpenEJBException("The use of a resource adapter requires a Geronimo transaction manager");
            }
            GeronimoTransactionManager geronimoTransactionManager = (GeronimoTransactionManager) transactionManager;

            // create a thead pool
            int threadPoolSize = getIntProperty(serviceInfo.properties, "threadPoolSize", 30);
            if (threadPoolSize <= 0) throw new IllegalArgumentException("threadPoolSizes <= 0: " + threadPoolSize);
            Executor threadPool = Executors.newFixedThreadPool(threadPoolSize, new ResourceAdapterThreadFactory(serviceInfo.id));
View Full Code Here

import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
import org.apache.openejb.resource.jdbc.JdbcManagedConnectionFactory;

public class GeronimoConnectionManagerTest extends TestCase {
    public void test() throws Exception {
        TransactionManager transactionManager = new GeronimoTransactionManager();

        GeronimoConnectionManagerFactory connectionManagerFactory = new GeronimoConnectionManagerFactory();
        connectionManagerFactory.setTransactionManager(transactionManager);
        ConnectionManager connectionManager = connectionManagerFactory.create();
View Full Code Here

import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
import org.apache.openejb.resource.jdbc.JdbcManagedConnectionFactory;

public class SharedLocalConnectionManagerTest extends TestCase {
    public void test() throws Exception {
        TransactionManager transactionManager = new GeronimoTransactionManager();
        ConnectionManager connectionManager = new SharedLocalConnectionManager(transactionManager);

        ManagedConnectionFactory managedConnectionFactory = new JdbcManagedConnectionFactory("org.hsqldb.jdbcDriver",
                "jdbc:hsqldb:mem",
                "sa",
View Full Code Here

/**
* @version $Rev: 476049 $ $Date: 2006-11-16 23:35:17 -0500 (Thu, 16 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-16 23:35:17 -0500 (Thu, 16 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

    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

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

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

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

        // initialize properties
View Full Code Here

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

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

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

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