public synchronized void setMessageListener(MessageListener listener, JMSMethodInvocation mi, Interceptor receiverInterceptor) throws JMSException
public void setMessageListener(MessageListener listener) throws JMSException
   public synchronized void setMessageListener(MessageListener listener,                                               JMSMethodInvocation mi,                                               Interceptor receiverInterceptor) throws JMSException   {      if (receiving)      {         throw new JBossJMSException("Another thread is already receiving");      }                        if (listenerThread != null)      {         listenerThread.interrupt();         try         {            listenerThread.join();         }         catch (InterruptedException e)         {            log.error("Thread interrupted", e);         }      }            this.listener = listener;      if (listener != null)      {         this.mi = mi;         this.receiverInterceptor = receiverInterceptor;         listenerThread = new Thread(this, "MessageListenerThread-" + listenerThreadCount++);         listenerThread.start();      }   }