code: public boolean isGlobalTxActive()
     {
        TransactionContext ctx;
        try
        {
           // We need to check the status also to be able to manage properly suspend and resume
           return (ctx = contexts.get()) != null && ctx.getXidContext() != null && tm.getStatus() != Status.STATUS_NO_TRANSACTION;
        }
        catch (SystemException e)
        {
           log.warn("Could not check if a global Tx has been started", e);
        }
        return false;
     }
docs: Indicates whether a global tx is active or not
  @return <code>true</code> if a global tx is active, <code>false</code> otherwise.