Package org.apache.openejb.resource

Examples of org.apache.openejb.resource.GeronimoConnectionManagerFactory


            // get the connection manager
            ConnectionManager connectionManager;
            if ((ManagedConnectionFactory) service instanceof JdbcManagedConnectionFactory) {
                connectionManager = SystemInstance.get().getComponent(ConnectionManager.class);
            } else {
                GeronimoConnectionManagerFactory connectionManagerFactory = new GeronimoConnectionManagerFactory();
                // default transaction support is "local" and that doesn't seem to work
                connectionManagerFactory.setTransactionSupport("xa");
                connectionManagerFactory.setTransactionManager(transactionManager);
                ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
                if (classLoader == null) classLoader = getClass().getClassLoader();
                if (classLoader == null) classLoader = ClassLoader.getSystemClassLoader();
                connectionManagerFactory.setClassLoader(classLoader);
                connectionManager = connectionManagerFactory.create();
            }

            if (connectionManager == null) {
                throw new RuntimeException("Invalid connection manager specified for connector identity = " + serviceInfo.id);
            }
View Full Code Here

TOP

Related Classes of org.apache.openejb.resource.GeronimoConnectionManagerFactory

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.