activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From LiXiao2007 <>
Subject How to stop the program gracefully
Date Mon, 05 Mar 2007 19:30:23 GMT

I have a multi threaded program something like as follows.

    create threads_1 to thread_n.
    create a connection to JMS queue
    for each thread

// for each thread's run method
   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:
Sent from the ActiveMQ - User mailing list archive at

View raw message