log.info("****************ACKNOWLEDGING");
   public Object handlePostDeliver(Invocation invocation) throws Throwable   {       MethodInvocation mi = (MethodInvocation)invocation;      SessionState state = getState(invocation);            int ackMode = state.getAcknowledgeMode();            if (ackMode == Session.AUTO_ACKNOWLEDGE ||          ackMode == Session.DUPS_OK_ACKNOWLEDGE ||          ackMode != Session.CLIENT_ACKNOWLEDGE && state.getCurrentTxId() == null)      {         // We acknowledge immediately on a non-transacted session that does not want to         // CLIENT_ACKNOWLEDGE, or an XA session not enrolled in a global transaction.         SessionDelegate sd = (SessionDelegate)mi.getTargetObject();         if (!state.isRecoverCalled())         {            if (trace) { log.trace("acknowledging NON-transactionally"); }            List acks = state.getToAck();            AckInfo ack = (AckInfo)acks.get(0);            sd.acknowledge(ack);            state.getToAck().clear();         }         else         {            if (trace) { log.trace("recover called, so NOT acknowledging"); }            state.setRecoverCalled(false);         }      }      return null;   }