if (xid == null) { throw new FBResourceTransactionException( "No local transaction active: can't commit", FBResourceTransactionException.SQL_STATE_INVALID_TRANSACTION_STATE); }
if (xid == null) return;
     public void internalCommit() throws ResourceException {         if (xid == null) {             throw new FBResourceTransactionException(                     "No local transaction active: can't commit",                     FBResourceTransactionException.SQL_STATE_INVALID_TRANSACTION_STATE);         }                  synchronized(mc)         {             try              {                 mc.internalEnd(xid, XAResource.TMSUCCESS);                 mc.internalCommit(xid, true);             } catch(XAException ex) {                 throw new FBResourceTransactionException(                         ex.getMessage(), ex);             } catch(GDSException ex) {                 throw new FBResourceException(ex);             }             finally {                 xid = null;             }             if (commitEvent != null) {                 mc.notify(                         FBManagedConnection.localTransactionCommittedNotifier,                          commitEvent);             }         }     }