Package org.apache.geronimo.transaction.context

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


        broker.setPersistent(false);
        broker.addConnector("tcp://localhost:61616");
        broker.start();

        TransactionManagerImpl exTransactionManager = new TransactionManagerImpl(600, new XidFactoryImpl(), null, null);
        TransactionContextManager transactionContextManager = new TransactionContextManager(exTransactionManager, exTransactionManager);
        tm = (TransactionManager) new GeronimoTransactionManager(transactionContextManager);

        JCAFlow jcaFlow = new JCAFlow();
        jcaFlow.setTransactionContextManager(transactionContextManager);
       
View Full Code Here


        broker.setPersistent(false);
        broker.addConnector("tcp://localhost:61616");
        broker.start();
       
        exTransactionManager = new TransactionManagerImpl(600, new XidFactoryImpl(), null, null);
        transactionContextManager = new TransactionContextManager(exTransactionManager, exTransactionManager);
        txManager = (TransactionManager) new GeronimoTransactionManager(transactionContextManager);
       
        JCAFlow jcaFlow = new JCAFlow();
        jcaFlow.setTransactionContextManager(transactionContextManager);
       
View Full Code Here

    public GeronimoFactory() {
    }

    public TransactionManager getTransactionManager() {
        Kernel kernel = KernelRegistry.getSingleKernel();
        TransactionContextManager ctxManager = null;

        try {
            ctxManager = (TransactionContextManager) kernel.getGBean(TransactionContextManager.class);
        } catch (GBeanNotFoundException except) {
            throw new RuntimeException( "Can't lookup GBean: " + TransactionContextManager.class, except);
        }

        MultiParentClassLoader loader = (MultiParentClassLoader) ctxManager.getClass().getClassLoader();

        // Add Jencks to Geronimo's root classloader to avoid InvalidAccessError
        AbstractNameQuery abstractNameQuery = new AbstractNameQuery(null, Collections.EMPTY_MAP, Repository.class.getName());
        Set set = kernel.listGBeans(abstractNameQuery);
        for (Iterator iterator = set.iterator(); iterator.hasNext();) {
View Full Code Here

        connector = new ConnectorGBean("HTTP", null, "localhost", 8181, container);
        connector.doStart();

        TransactionManagerImpl tm = new TransactionManagerImpl(10, null, null, Collections.EMPTY_LIST);
        transactionContextManager = new TransactionContextManager(tm, tm);
        connectionTrackingCoordinator = new ConnectionTrackingCoordinator();
    }
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();
        transactionManager = new TransactionManagerImpl(10 * 1000,
                new XidFactoryImpl("WHAT DO WE CALL IT?".getBytes()), null, null);
        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager);
        transactionCachingInterceptor = new TransactionCachingInterceptor(this, transactionContextManager);
    }
View Full Code Here

    protected void setUp() throws Exception {
        connectionTrackingCoordinator = new ConnectionTrackingCoordinator();
        TransactionManagerImpl transactionManager = new TransactionManagerImpl(10 * 1000,
                new XidFactoryImpl("WHAT DO WE CALL IT?".getBytes()), null, null);
        transactionContextManager = new TransactionContextManager(transactionManager, transactionManager);
        mockManagedConnectionFactory = new MockManagedConnectionFactory();
        subject = new Subject();
        ContextManager.setCallers(subject, subject);
        connectionManagerDeployment = new GenericConnectionManager(
                transactionSupport,
View Full Code Here

        if (enc != null) {
            interceptor = new ComponentContextBeforeAfter(interceptor, index++, enc);
        }

        // Set TransactionContext BeforeAfter
        TransactionContextManager transactionContextManager = ctx.getTransactionContextManager();
        if (transactionContextManager != null) {
            interceptor = new TransactionContextBeforeAfter(interceptor, index++, transactionContextManager);
        }

        //Set a PolicyContext BeforeAfter
View Full Code Here

    /**
     * Tests get and set work manager
     */
    public void testGetSetWorkManager() {
        TransactionContextManager transactionContextManager = new TransactionContextManager();
        GeronimoWorkManager manager = new GeronimoWorkManager(pool, pool, pool, transactionContextManager);
        BootstrapContextImpl context = new BootstrapContextImpl(manager);
        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() {
        TransactionContextManager transactionContextManager = new TransactionContextManager();
        GeronimoWorkManager manager = new GeronimoWorkManager(pool, pool, pool, transactionContextManager);
        BootstrapContextImpl context = new BootstrapContextImpl(manager);
        XATerminator xat = context.getXATerminator();

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

        connector.setMaxThreads(50);
        connector.setMinThreads(10);
        connector.doStart();

        TransactionManagerImpl tm = new TransactionManagerImpl(10, null, null, Collections.EMPTY_LIST);
        transactionContextManager = new TransactionContextManager(tm, tm);
        connectionTrackingCoordinator = new ConnectionTrackingCoordinator();

    }
View Full Code Here

TOP

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

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.