boolean first;
if (trace) { log.trace(this + " adding " + ref + "transactionally in transaction: " + tx); }  if (ref.isReliable() && !acceptReliableMessages) {   if (trace) { log.trace(this + " cannot handle reliable messages, dooming the transaction"); } tx.setRollbackOnly(); } else {  synchronized (refLock) { ref.setOrdering(getNextReferenceOrdering());   this.getCallback(tx).addRef(ref); if (trace) { log.trace(this + " added transactionally " + ref + " in memory"); } } }  if (ref.isReliable() && recoverable) {  if (trace) { log.trace("adding " + ref + (tx == null ? " to database non-transactionally" : " in transaction: " + tx)); }  pm.addReference(channel.getChannelID(), ref, tx); }
   public boolean addReference(MessageReference ref) throws Throwable   {      boolean first;                   synchronized (refLock)      {                  ref.setOrdering(getNextReferenceOrdering());                        if (ref.isReliable() && recoverable)         {            //Reliable message in a recoverable state - also add to db            if (trace) { log.trace("adding " + ref + " to database non-transactionally"); }                        pm.addReference(channel.getChannelID(), ref, null);                     }                  first = addReferenceInMemory(ref);                                     }      return first;    }