asserts a javax.jms.messagelistener is not calling from its own javax.jms.connection or javax.jms.messageconsumer . 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 . concode_field_sep Thread completionListenerThread concode_elem_sep Set<Long> messageListenerThreads concode_field_sep void assertNotCompletionListenerThread concode_elem_sep void setCurrentThread concode_elem_sep void assertNotMessageListenerThreadRuntime concode_elem_sep void assertNotCompletionListenerThreadRuntime concode_elem_sep void clearCurrentThread
void function ( ) { if ( messageListenerThreads . contains ( Thread . currentThread ( ) . getId ( ) ) ) { throw HornetQJMSClientBundle . BUNDLE . callingMethodFromListener ( ) ; } }