/**
  * Asserts a {@link javax.jms.CompletionListener} is not calling from its own {@Link
  * javax.jms.Connection} or from a {@Link javax.jms.MessageProducer} .
  *
  * <p>Note that the code must work without any need for further synchronization, as there is the
  * requirement that only one CompletionListener be called at a time. In other words,
  * CompletionListener calling is single-threaded.
  *
  * @see javax.jms.Connection#close()
  * @see javax.jms.MessageProducer#close()
  */
 public void assertNotCompletionListenerThread() throws javax.jms.IllegalStateException {
   if (completionListenerThread == Thread.currentThread()) {
     throw HornetQJMSClientBundle.BUNDLE.callingMethodFromCompletionListener();
   }
 }
 /**
  * Asserts a {@link javax.jms.MessageListener} is not calling from its own {@link
  * javax.jms.Connection} or {@Link javax.jms.MessageConsumer}.
  *
  * <p>Note that the code must work without any need for further synchronization, as there is the
  * requirement that only one MessageListener be called at a time. In other words, MessageListener
  * calling is single-threaded.
  *
  * @see javax.jms.Connection#close()
  * @see javax.jms.MessageConsumer#close()
  */
 public void assertNotMessageListenerThread() throws IllegalStateException {
   if (messageListenerThreads.contains(Thread.currentThread().getId())) {
     throw HornetQJMSClientBundle.BUNDLE.callingMethodFromListener();
   }
 }
 /**
  * Asserts a {@link javax.jms.CompletionListener} is not calling from its own {@link
  * javax.jms.JMSContext}.
  *
  * <p>Note that the code must work without any need for further synchronization, as there is the
  * requirement that only one CompletionListener be called at a time. In other words,
  * CompletionListener calling is single-threaded.
  *
  * @see javax.jms.JMSContext#close()
  * @see javax.jms.JMSContext#stop()
  * @see javax.jms.JMSContext#commit()
  * @see javax.jms.JMSContext#rollback()
  */
 public void assertNotCompletionListenerThreadRuntime() {
   if (completionListenerThread == Thread.currentThread()) {
     throw HornetQJMSClientBundle.BUNDLE.callingMethodFromCompletionListenerRuntime();
   }
 }
 /**
  * Asserts a {@link javax.jms.MessageListener} is not calling from its own {@link
  * javax.jms.JMSContext}.
  *
  * <p>Note that the code must work without any need for further synchronization, as there is the
  * requirement that only one MessageListener be called at a time. In other words, MessageListener
  * calling is single-threaded.
  *
  * @see javax.jms.JMSContext#close()
  * @see javax.jms.JMSContext#stop()
  */
 public void assertNotMessageListenerThreadRuntime() {
   if (messageListenerThreads.contains(Thread.currentThread().getId())) {
     throw HornetQJMSClientBundle.BUNDLE.callingMethodFromListenerRuntime();
   }
 }