ManageableQueue q = (ManageableQueue)cm.getCoreDestination(jbq);
org.jboss.messaging.core.local.Queue q = (org.jboss.messaging.core.local.Queue)cm.getCoreDestination(jbq);
   public List listMessages(String selector) throws JMSException   {      if (!started)      {         log.warn("Queue is stopped.");         return new ArrayList();      }      JBossQueue jbq = new JBossQueue(name);      ManageableQueue q = (ManageableQueue)cm.getCoreDestination(jbq);      try       {         return q.getMessages(trimSelector(selector));      }      catch (InvalidSelectorException e)      {         Throwable th = new JMSException(e.getMessage());         th.initCause(e);         throw (JMSException)th;      }   }