xa.end(xid, XAResource.TMNOFLAGS);
xa.end(xid, XAResource.TMSUCCESS);
    public void testUseResultSet() throws Exception {                if (log != null) log.info("testUseResultSet");        FBManagedConnectionFactory mcf = initMcf();        ManagedConnection mc = mcf.createManagedConnection(null, null);        Connection c = (Connection)mc.getConnection(null, null);        Statement s = c.createStatement();        XAResource xa = mc.getXAResource();        Exception ex = null;        Xid xid = new XidImpl();        xa.start(xid, XAResource.TMNOFLAGS);        try {            s.execute("CREATE TABLE T1 ( C1 SMALLINT, C2 SMALLINT)");            //s.close();        }        catch (Exception e) {            ex = e;        }        xa.end(xid, XAResource.TMNOFLAGS);        xa.commit(xid, true);        xid = new XidImpl();        xa.start(xid, XAResource.TMNOFLAGS);        assertTrue("execute returned true for insert statement", !s.execute("insert into T1 values (1, 1)"));        assertTrue("executeUpdate did not return 1 for single row insert", s.executeUpdate("insert into T1 values (2, 2)") == 1);        assertTrue("execute returned false for select statement", s.execute("select C1, C2 from T1"));        ResultSet rs = s.getResultSet();        while (rs.next()) {            if (log != null) log.info("C1: " + rs.getShort(1) + " C2: " + rs.getShort(2));        }        rs.close();        //s.close();        xa.end(xid, XAResource.TMNOFLAGS);        xa.commit(xid, true);        xid = new XidImpl();        xa.start(xid, XAResource.TMNOFLAGS);        s.execute("DROP TABLE T1");        s.close();        xa.end(xid, XAResource.TMNOFLAGS);        xa.commit(xid, true);        mc.destroy();        if (ex != null) {            throw ex;        }    }