if (log.isTraceEnabled()) { log.trace(this + " adding " + ref + "transactionally in transaction: " + tx); }
if (trace) { log.trace(this + " adding " + ref + "transactionally in transaction: " + tx); }
   public void addReference(MessageReference ref, Transaction tx) throws Throwable   {      if (log.isTraceEnabled()) { log.trace(this + " adding " + ref + "transactionally in transaction: " + tx); }      if (ref.isReliable() && !acceptReliableMessages)      {         // this transaction has no chance to succeed, since a reliable message cannot be         // safely stored by a non-recoverable state, so doom the transaction         if (log.isTraceEnabled()) { log.trace(this + " cannot handle reliable messages, dooming the transaction"); }         tx.setRollbackOnly();      }      else      {         //add to post commit callback         AddReferenceCallback callback = addAddReferenceCallback(tx);         callback.addReference(ref);         if (log.isTraceEnabled()) { log.trace(this + " added transactionally " + ref + " in memory"); }      }     }