@Test public void testClose() throws Exception { JdbcPooledConnection con = configure(createConnection()); con.setConnectUrl("jdbc:derby:memory:" + GUID.safeUUID() + ";create=true"); con.setDriverImp("org.apache.derby.jdbc.EmbeddedDriver"); con.setPoolFactory(new DebugPoolFactory()); assertEquals(ClosedState.getInstance(), con.retrieveComponentState()); assertNull(con.connectionPool); con.close(); assertNotNull(con.asDataSource()); assertNotNull(con.connectionPool); con.close(); assertNull(con.connectionPool); }
public void setPoolFactory(JdbcPoolFactory f) { this.poolFactory = f; }
JdbcPooledConnection extends JdbcPooledConnectionImpl { public void setPoolFactory(JdbcPoolFactory f) { this.poolFactory = f; } }
JdbcPooledConnection extends JdbcPooledConnectionImpl { public void setPoolFactory(JdbcPoolFactory f) { this.poolFactory = f; } JdbcPooledConnection(); }
JdbcPooledConnection extends JdbcPooledConnectionImpl { public void setPoolFactory(JdbcPoolFactory f) { this.poolFactory = f; } JdbcPooledConnection(); @Override boolean equals(Object o); @Override int hashCode(); Integer getMinimumPoolSize(); void setMinimumPoolSize(Integer minimumPoolSize); int minPoolSize(); Integer getMaximumPoolSize(); void setMaximumPoolSize(Integer maximumPoolSize); int maxPoolSize(); Integer getAcquireIncrement(); void setAcquireIncrement(Integer acquireIncrement); TimeInterval getConnectionAcquireWait(); void setConnectionAcquireWait(TimeInterval connectionAcquireWait); TimeInterval getIdleConnectionTestPeriod(); void setIdleConnectionTestPeriod(TimeInterval idleConnectionTestPeriod); TimeInterval getMaxIdleTime(); void setMaxIdleTime(TimeInterval t); int currentBusyConnectionCount(); int currentConnectionCount(); int currentIdleConnectionCount(); JdbcPoolFactory getPoolFactory(); void setPoolFactory(JdbcPoolFactory f); }
JdbcPooledConnection extends JdbcPooledConnectionImpl { public void setPoolFactory(JdbcPoolFactory f) { this.poolFactory = f; } JdbcPooledConnection(); @Override boolean equals(Object o); @Override int hashCode(); Integer getMinimumPoolSize(); void setMinimumPoolSize(Integer minimumPoolSize); int minPoolSize(); Integer getMaximumPoolSize(); void setMaximumPoolSize(Integer maximumPoolSize); int maxPoolSize(); Integer getAcquireIncrement(); void setAcquireIncrement(Integer acquireIncrement); TimeInterval getConnectionAcquireWait(); void setConnectionAcquireWait(TimeInterval connectionAcquireWait); TimeInterval getIdleConnectionTestPeriod(); void setIdleConnectionTestPeriod(TimeInterval idleConnectionTestPeriod); TimeInterval getMaxIdleTime(); void setMaxIdleTime(TimeInterval t); int currentBusyConnectionCount(); int currentConnectionCount(); int currentIdleConnectionCount(); JdbcPoolFactory getPoolFactory(); void setPoolFactory(JdbcPoolFactory f); static final int DEFAULT_MINIMUM_POOL_SIZE; static final int DEFAULT_MAXIMUM_POOL_SIZE; static final int DEFAULT_ACQUIRE_INCREMENT; }