/** * 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(); } }