You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Xi Yue <st...@gmail.com> on 2007/11/22 13:40:10 UTC

How to clean up client's connection when server fails?

     I'm trying to build a reliable application using ActiveMQ 4.1.1 with
activemq-cpp-2.1. I followed the clean up procedure shown in the example
prog. It worked correctly if the server was present. However, problem raised
when i tried to simulate the case if the server fails and has been shut down
abnormally. After some investigation, i found that the api hanged after it
had joined the inner thread of IOTransport. It seems that it was waiting for
the thread's stop which had never happened.
     Is there anyone who knows a clean up procedure that works under both
situations, say, normal disconnection and abnormal one?
 
-- 
View this message in context: http://www.nabble.com/How-to-clean-up-client%27s-connection-when-server-fails--tf4856131s2354.html#a13895939
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: How to clean up client's connection when server fails?

Posted by Timothy Bish <ta...@twcny.rr.com>.
First you should upgrade to v2.1.1 of the cpp client as there were some 
shutdown issues that were fixed.

Tell us what compiler and platform you are on, it helps if we can 
reproduce the problem in the same environment as windows / mac / linux 
etc all behave a little differently.

Then if you are stiff having issues, you could create a jira issue that 
documents the problem and either give us some sample code that 
demonstrates the problem, or if you are using the example describe the 
steps that you used to reproduce the problem.

The clean up code in  the example should be all you need.  So I don't 
know why its hanging.


Regards
Tim

Xi Yue wrote:
>      I'm trying to build a reliable application using ActiveMQ 4.1.1 with
> activemq-cpp-2.1. I followed the clean up procedure shown in the example
> prog. It worked correctly if the server was present. However, problem raised
> when i tried to simulate the case if the server fails and has been shut down
> abnormally. After some investigation, i found that the api hanged after it
> had joined the inner thread of IOTransport. It seems that it was waiting for
> the thread's stop which had never happened.
>      Is there anyone who knows a clean up procedure that works under both
> situations, say, normal disconnection and abnormal one?
>  
>