I have a multi threaded program something like as follows. main() { create threads_1 to thread_n. create a connection to JMS queue for each thread thread_i.start(); }
// for each thread's run method run() { create session create consumer register the consumer with a message listener } My understanding is that as soon as run finishes, the thread is gone but the jms run time creates another thread listening on onMessage(). My question is how to exit the program gracefully. I would like to let each thread finishes its job and exits by itsself. Any help is greately appreciated. -- View this message in context: http://www.nabble.com/How-to-stop-the-program-gracefully-tf3351123s2354.html#a9318656 Sent from the ActiveMQ - User mailing list archive at Nabble.com.