@Test public void testPoolBuilder() throws Exception { DefaultPoolFactory factory = new DefaultPoolFactory(); PluggableJdbcPooledConnection con = createConnection(); C3P0PooledDataSource pooledDs = factory.build(con); ComboPooledDataSource wrapped = pooledDs.wrapped(); assertEquals(con.getConnectUrl(), wrapped.getJdbcUrl()); }
@Override public C3P0PooledDataSource build(PluggableJdbcPooledConnection conn) throws Exception { ComboPooledDataSource pool = create(); pool.setProperties(conn.connectionProperties()); pool.setDriverClass(conn.getDriverImp()); pool.setJdbcUrl(conn.getConnectUrl()); pool.setUser(conn.getUsername()); pool.setPassword(Password.decode(ExternalResolver.resolve(conn.getPassword()))); PooledConnectionProperties.apply(conn.poolProperties(), pool); return new C3P0PooledDataSource(pool); }
DefaultPoolFactory implements JdbcPoolFactory, ConnectionPoolBuilder { @Override public C3P0PooledDataSource build(PluggableJdbcPooledConnection conn) throws Exception { ComboPooledDataSource pool = create(); pool.setProperties(conn.connectionProperties()); pool.setDriverClass(conn.getDriverImp()); pool.setJdbcUrl(conn.getConnectUrl()); pool.setUser(conn.getUsername()); pool.setPassword(Password.decode(ExternalResolver.resolve(conn.getPassword()))); PooledConnectionProperties.apply(conn.poolProperties(), pool); return new C3P0PooledDataSource(pool); } }
DefaultPoolFactory implements JdbcPoolFactory, ConnectionPoolBuilder { @Override public C3P0PooledDataSource build(PluggableJdbcPooledConnection conn) throws Exception { ComboPooledDataSource pool = create(); pool.setProperties(conn.connectionProperties()); pool.setDriverClass(conn.getDriverImp()); pool.setJdbcUrl(conn.getConnectUrl()); pool.setUser(conn.getUsername()); pool.setPassword(Password.decode(ExternalResolver.resolve(conn.getPassword()))); PooledConnectionProperties.apply(conn.poolProperties(), pool); return new C3P0PooledDataSource(pool); }  }
DefaultPoolFactory implements JdbcPoolFactory, ConnectionPoolBuilder { @Override public C3P0PooledDataSource build(PluggableJdbcPooledConnection conn) throws Exception { ComboPooledDataSource pool = create(); pool.setProperties(conn.connectionProperties()); pool.setDriverClass(conn.getDriverImp()); pool.setJdbcUrl(conn.getConnectUrl()); pool.setUser(conn.getUsername()); pool.setPassword(Password.decode(ExternalResolver.resolve(conn.getPassword()))); PooledConnectionProperties.apply(conn.poolProperties(), pool); return new C3P0PooledDataSource(pool); }  @Override ComboPooledDataSource create(); @Override C3P0PooledDataSource build(PluggableJdbcPooledConnection conn); }
DefaultPoolFactory implements JdbcPoolFactory, ConnectionPoolBuilder { @Override public C3P0PooledDataSource build(PluggableJdbcPooledConnection conn) throws Exception { ComboPooledDataSource pool = create(); pool.setProperties(conn.connectionProperties()); pool.setDriverClass(conn.getDriverImp()); pool.setJdbcUrl(conn.getConnectUrl()); pool.setUser(conn.getUsername()); pool.setPassword(Password.decode(ExternalResolver.resolve(conn.getPassword()))); PooledConnectionProperties.apply(conn.poolProperties(), pool); return new C3P0PooledDataSource(pool); }  @Override ComboPooledDataSource create(); @Override C3P0PooledDataSource build(PluggableJdbcPooledConnection conn);  }