activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gali_ka <>
Subject race condition in handling connection errors
Date Wed, 16 Jan 2008 13:19:07 GMT

we have an c++ application using activemq.
As we understand, in case of broken connection we can get a signal about it
from two places:
1. we try to send and get an exception in our thread
2. onException() - that will be proceeded from another thread (activemq
listener thread).
We see a possibility for a race condition in handling the error.
If we get the exception in our thread we would like to close the connection
and to delete the connection objects and resources, but as we do it, the
onException() may be just called in another thread. 
The question is whether we understand the situation correctly and the race
condition is possible and we should write the synchronization code.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message