String consumerID = (String)mi.getArguments()[1];
int consumerID = ((Integer)mi.getArguments()[1]).intValue();
   public Object handlePreDeliver(Invocation invocation) throws Throwable   {      SessionState state = (SessionState)getState(invocation);            if (state.isTransacted())      {         MethodInvocation mi = (MethodInvocation)invocation;                  String messageID = (String)mi.getArguments()[0];                  String consumerID = (String)mi.getArguments()[1];                  Object txID = state.getCurrentTxId();                  if (txID == null)         {            throw new IllegalStateException("Attempt to send message in tx, but txId is null, XA?" + state.isXA());         }                  ConnectionState connState = (ConnectionState)state.getParent();                  //Add the acknowledgement to the transaction                  connState.getResourceManager().addAck(txID, new AckInfo(messageID, consumerID));                        }            return null;   }