if (log != null) log.debug("can't perform query to fetch xids", ex); throw new FBXAException(XAException.XAER_RMFAIL, ex);
throw new FBXAException("can't perform query to fetch xids", XAException.XAER_RMFAIL, ex);
    public Xid[] recover(int flag) throws javax.transaction.xa.XAException {        try {            ArrayList xids = new ArrayList();                        AbstractIscTrHandle trHandle2 = (AbstractIscTrHandle)gds.createIscTrHandle();            gds.iscStartTransaction(trHandle2, gdsHelper.getCurrentDbHandle(), tpb.getTransactionParameterBuffer());                        AbstractIscStmtHandle stmtHandle2 = (AbstractIscStmtHandle)gds.createIscStmtHandle();            gds.iscDsqlAllocateStatement(gdsHelper.getCurrentDbHandle(), stmtHandle2);                        GDSHelper gdsHelper2 = new GDSHelper(gds,                     gdsHelper.getDatabaseParameterBuffer(),                     (AbstractIscDbHandle) gdsHelper.getCurrentDbHandle(), null);            gdsHelper2.setCurrentTrHandle(trHandle2);                        gdsHelper2.prepareStatement(stmtHandle2, RECOVERY_QUERY, false);            gdsHelper2.executeStatement(stmtHandle2, false);            gdsHelper2.fetch(stmtHandle2, 10);                        DataProvider dataProvider0 = new DataProvider(stmtHandle2, 0);            DataProvider dataProvider1 = new DataProvider(stmtHandle2, 1);                        FBField field0 = FBField.createField(stmtHandle2.getOutSqlda().sqlvar[0], dataProvider0, gdsHelper2, false);            FBField field1 = FBField.createField(stmtHandle2.getOutSqlda().sqlvar[1], dataProvider1, gdsHelper2, false);                        field0.setConnection(gdsHelper2);            field1.setConnection(gdsHelper2);                        int row = 0;            while(row < stmtHandle2.getRows().length) {                            if (stmtHandle2.getRows()[row] == null) {                    row++;                    continue;                }                                dataProvider0.setRow(row);                dataProvider1.setRow(row);                                long inLimboTxId = field0.getLong();                byte[] inLimboMessage = field1.getBytes();                            try {                    FBXid xid = new FBXid(new ByteArrayInputStream(inLimboMessage), inLimboTxId);                    xids.add(xid);                } catch(FBIncorrectXidException ex) {                    // ignore this Xid                }                    row++;            }                gdsHelper2.closeStatement(stmtHandle2, true);            gds.iscCommitTransaction(trHandle2);                        return (FBXid[])xids.toArray(new FBXid[xids.size()]);        } catch(GDSException ex) {            if (log != null)                log.debug("can't perform query to fetch xids", ex);            throw new FBXAException(XAException.XAER_RMFAIL, ex);        } catch (SQLException sqle) {            if (log != null)                log.debug("can't perform query to fetch xids", sqle);            throw new FBXAException(XAException.XAER_RMFAIL, sqle);        }         catch (ResourceException re) {            if (log != null)                log.debug("can't perform query to fetch xids", re);            throw new FBXAException(XAException.XAER_RMFAIL, re);        }     }