int ackMode = state.getAcknowledgeMode();  if (ackMode == Session.SESSION_TRANSACTED)
if (state.isTransacted())
   public Object handleRecover(Invocation invocation) throws Throwable   {      if (trace) { log.trace("recover called"); }            MethodInvocation mi = (MethodInvocation)invocation;                  SessionState state = getState(invocation);            int ackMode = state.getAcknowledgeMode();               if (ackMode == Session.SESSION_TRANSACTED)      {         throw new IllegalStateException("Cannot recover a transacted session");      }            if (trace) { log.trace("recovering the session"); }             //Call redeliver      SessionDelegate del = (SessionDelegate)mi.getTargetObject();            del.redeliver(state.getToAck());                  state.getToAck().clear();      state.setRecoverCalled(true);            return null;     }