Connection con1 = null, con2 = null;
try
{
System.out.println("TEST5 : Temporary tables declared in a pooled connection should get dropped when that pooled connection is closed");
ConnectionPoolDataSource dsp;
if (isDerbyNet) {
/* following would require the IBM universal jdbc driver to be available during build...This section needs to be reworked for networkserver
com.ibm.db2.jcc.DB2ConnectionPoolDataSource ds = new com.ibm.db2.jcc.DB2ConnectionPoolDataSource();
ds.setDatabaseName("wombat");
ds.setUser("cs");
ds.setPassword("cs");
hostName = TestUtil.getHostName();
ds.setServerName(hostName);
ds.setPortNumber(1527);
ds.setDriverType(4);
dsp = ds;
*/
System.out.println("test will not build without universal driver");
return passed;
} else {
EmbeddedConnectionPoolDataSource dscsp = new EmbeddedConnectionPoolDataSource();
dscsp.setDatabaseName("wombat");
//dscsp.setConnectionAttributes("unicode=true");
dsp = dscsp;
}
PooledConnection pc = dsp.getPooledConnection();
con1 = pc.getConnection();
con1.setAutoCommit(false);
Statement s = con1.createStatement();
System.out.println(" In the first connection handle to the pooled connection, create physical session schema, create table t1 in it");