String consumerID = (String)((Advised)cons)._getInstanceAdvisor().getMetaData(). getMetaData(MetaDataConstants.JMS, MetaDataConstants.CONSUMER_ID);
int consumerID = ((Integer)((Advised)cons)._getInstanceAdvisor().getMetaData(). getMetaData(MetaDataConstants.JMS, MetaDataConstants.CONSUMER_ID)).intValue();
   public Object handleCreateConsumerDelegate(Invocation invocation) throws Throwable   {      ConsumerDelegate cons = (ConsumerDelegate)invocation.invokeNext();            DelegateSupport delegate = (DelegateSupport)cons;            delegate.init();            SessionState sessState = (SessionState)getState(invocation);            MethodInvocation mi = (MethodInvocation)invocation;      Destination dest = (Destination)mi.getArguments()[0];      String selector = (String)mi.getArguments()[1];      boolean noLocal = ((Boolean)mi.getArguments()[2]).booleanValue();          boolean connectionConsumer = ((Boolean)mi.getArguments()[4]).booleanValue();      String consumerID =         (String)((Advised)cons)._getInstanceAdvisor().getMetaData().         getMetaData(MetaDataConstants.JMS, MetaDataConstants.CONSUMER_ID);            ConsumerState state = new ConsumerState(sessState, cons, dest, selector, noLocal,                                              consumerID, connectionConsumer);            delegate.setState(state);            return cons;   }