Package org.apache.openejb.resource.jdbc.dbcp

Examples of org.apache.openejb.resource.jdbc.dbcp.DbcpManagedDataSource


    }

    private void check(final DataSource ds, final String name) throws SQLException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        // the first "cast part" is not important, we just want to check the jdbc url is ok
        assertThat(ds, instanceOf(DbcpManagedDataSource.class));
        final DbcpManagedDataSource dbcp = (DbcpManagedDataSource) ds;
        final Connection connection = dbcp.getConnection();
        assertThat(connection, instanceOf(ManagedConnection.class));
        final ManagedConnection mc = (ManagedConnection) connection;
        final Method getInnermostDelegateInternal = DelegatingConnection.class.getDeclaredMethod("getInnermostDelegateInternal");
        getInnermostDelegateInternal.setAccessible(true);
        final Connection delegate = (Connection) getInnermostDelegateInternal.invoke(mc);
View Full Code Here


// TODO: remove it and replace it with org.apache.openejb.resource.jdbc.dbcp.DbcpDataSourceCreator
public class DefaultDataSourceCreator extends DbcpDataSourceCreator {
    @Override
    public DataSource managed(final String name, final DataSource ds) {
        return new DbcpManagedDataSource(name, ds);
    }
View Full Code Here

        return new DbcpManagedDataSource(name, ds);
    }

    @Override
    public DataSource poolManaged(final String name, final DataSource ds, final Properties properties) {
        return new DbcpManagedDataSource(name, ds);
    }
View Full Code Here

// TODO: remove it and replace it with org.apache.openejb.resource.jdbc.dbcp.DbcpDataSourceCreator
public class DefaultDataSourceCreator extends DbcpDataSourceCreator {
    @Override
    public DataSource managed(final String name, final DataSource ds) {
        return new DbcpManagedDataSource(name, ds);
    }
View Full Code Here

        return new DbcpManagedDataSource(name, ds);
    }

    @Override
    public DataSource poolManaged(final String name, final DataSource ds, Properties properties) {
        return new DbcpManagedDataSource(name, ds);
    }
View Full Code Here

    }

    private void check(final DataSource ds, final String name) throws SQLException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        // the first "cast part" is not important, we just want to check the jdbc url is ok
        assertThat(ds, instanceOf(DbcpManagedDataSource.class));
        final DbcpManagedDataSource dbcp = (DbcpManagedDataSource) ds;
        final Connection connection = dbcp.getConnection();
        assertThat(connection, instanceOf(ManagedConnection.class));
        final ManagedConnection mc = (ManagedConnection) connection;
        final Method getInnermostDelegateInternal = DelegatingConnection.class.getDeclaredMethod("getInnermostDelegateInternal");
        getInnermostDelegateInternal.setAccessible(true);
        final Connection delegate = (Connection) getInnermostDelegateInternal.invoke(mc);
View Full Code Here

TOP

Related Classes of org.apache.openejb.resource.jdbc.dbcp.DbcpManagedDataSource

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.