Connection con = pool.getPooledConnection().getConnection(); con.setAutoCommit(false);
    public void testPrepareWithError() throws Exception {        Connection con = pool.getPooledConnection().getConnection();        con.setAutoCommit(false);        try {            PreparedStatement stmt = con.prepareStatement("bla");            fail("Should not enter here.");        } catch(SQLException ex) {            // everything is fine        } finally {            con.close();        }    }