/** * 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 ActiveMQJMSClientBundle.BUNDLE.callingMethodFromListener(); } }
/** * 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 ActiveMQJMSClientBundle.BUNDLE.callingMethodFromListener(); } }
/** * 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 ActiveMQJMSClientBundle.BUNDLE.callingMethodFromListener(); } }
/** * 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 ActiveMQJMSClientBundle.BUNDLE.callingMethodFromListener(); } }
/** * 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 ActiveMQJMSClientBundle.BUNDLE.callingMethodFromListener(); } }