@Test public void testCreate() throws Exception { DebugPoolFactory factory = new DebugPoolFactory().withDebugUnreturnedConnectionStackTraces(true) .withUnreturnedConnectionTimeout(new TimeInterval(10L, TimeUnit.SECONDS));; ComboPooledDataSource pooledDS = factory.create(); assertTrue(pooledDS.isDebugUnreturnedConnectionStackTraces()); assertEquals(10, pooledDS.getUnreturnedConnectionTimeout()); }
@Override public ComboPooledDataSource create() throws Exception { ComboPooledDataSource result = super.create(); result.setUnreturnedConnectionTimeout(unreturnedConnectionTimeout()); result.setDebugUnreturnedConnectionStackTraces(debugUnreturnedConnectionStackTraces()); result.setLogWriter(new PrintWriter(new Slf4jLoggingOutputStream(logger, "DEBUG"), true)); return result; }
DebugPoolFactory extends DefaultPoolFactory { @Override public ComboPooledDataSource create() throws Exception { ComboPooledDataSource result = super.create(); result.setUnreturnedConnectionTimeout(unreturnedConnectionTimeout()); result.setDebugUnreturnedConnectionStackTraces(debugUnreturnedConnectionStackTraces()); result.setLogWriter(new PrintWriter(new Slf4jLoggingOutputStream(logger, "DEBUG"), true)); return result; } }
DebugPoolFactory extends DefaultPoolFactory { @Override public ComboPooledDataSource create() throws Exception { ComboPooledDataSource result = super.create(); result.setUnreturnedConnectionTimeout(unreturnedConnectionTimeout()); result.setDebugUnreturnedConnectionStackTraces(debugUnreturnedConnectionStackTraces()); result.setLogWriter(new PrintWriter(new Slf4jLoggingOutputStream(logger, "DEBUG"), true)); return result; }  }
DebugPoolFactory extends DefaultPoolFactory { @Override public ComboPooledDataSource create() throws Exception { ComboPooledDataSource result = super.create(); result.setUnreturnedConnectionTimeout(unreturnedConnectionTimeout()); result.setDebugUnreturnedConnectionStackTraces(debugUnreturnedConnectionStackTraces()); result.setLogWriter(new PrintWriter(new Slf4jLoggingOutputStream(logger, "DEBUG"), true)); return result; }  @Override ComboPooledDataSource create(); TimeInterval getUnreturnedConnectionTimeout(); void setUnreturnedConnectionTimeout(TimeInterval interval); DebugPoolFactory withUnreturnedConnectionTimeout(TimeInterval interval); Boolean getDebugUnreturnedConnectionStackTraces(); void setDebugUnreturnedConnectionStackTraces(Boolean onOff); DebugPoolFactory withDebugUnreturnedConnectionStackTraces(Boolean b); }
DebugPoolFactory extends DefaultPoolFactory { @Override public ComboPooledDataSource create() throws Exception { ComboPooledDataSource result = super.create(); result.setUnreturnedConnectionTimeout(unreturnedConnectionTimeout()); result.setDebugUnreturnedConnectionStackTraces(debugUnreturnedConnectionStackTraces()); result.setLogWriter(new PrintWriter(new Slf4jLoggingOutputStream(logger, "DEBUG"), true)); return result; }  @Override ComboPooledDataSource create(); TimeInterval getUnreturnedConnectionTimeout(); void setUnreturnedConnectionTimeout(TimeInterval interval); DebugPoolFactory withUnreturnedConnectionTimeout(TimeInterval interval); Boolean getDebugUnreturnedConnectionStackTraces(); void setDebugUnreturnedConnectionStackTraces(Boolean onOff); DebugPoolFactory withDebugUnreturnedConnectionStackTraces(Boolean b);  }