TestConnection tc = null;
try
{
DataSource ds = (DataSource) new InitialContext().lookup("java:StatementTestsConnectionDS");
Connection c = ds.getConnection();
WrappedConnection wc = (WrappedConnection) c;
Connection uc = wc.getUnderlyingConnection();
tc = (TestConnection) Proxy.getInvocationHandler(uc);
c.close();
tc.setFail(true);
int closeCount1 = tc.getClosedCount();
c = ds.getConnection();