Doing a connection.close() should be sufficient.

On 3/21/07, Dennis Cheung <[EMAIL PROTECTED]> wrote:
I have some problem on shutting down the ActiveMQ client (not the broker).

----
I have a Java application using ActiveMQ 4.0.2.  (async send is already
disabled, tcpNoDelay is enabled)

   1. Create temporary topic A.
   2. Send message to another queue B.
   3. Receive a message on topic A, with a timeout given.
   4. Send 2nd message to queue B.
   5. Close the application

On step 5, I do close all safe shutdown step,
  close producer, close consumer, delete TemporaryQueue, close JMS session
and close JMS connection.
But I found that some ActiveMQ thread still running on the background.
And my client application does not shutdown after "static void main"
finished.
((It is a multi-thread application. I am not sure is it my thread or
activemq thread is not daemon, and JVM was blocked and not shutting down.))

And now, I have to call System.exit(0) to force the JVM being closed.
-----

I just want to make sure that is it a safe operation?? The ActiveMQ broker
will not fail?

Beside, I found that there are so many Advisory Message consumer of
temporary topic/queue on the BROKER, ever if all client are already closed.
Is it related to the above statements?

Thanks,

----
Dennis



--
Regards,
Hiram

Blog: http://hiramchirino.com

Reply via email to