activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khudalla <Kai.Huda...@de.bosch.com>
Subject Re: Handling of RuntimeExceptions in ActiveMQSession.run() method
Date Fri, 30 May 2008 11:11:16 GMT

Rob,

thanks for your explanations. However, even if we had such an additional
listener for this kind of exception, what would such a listener be supposed
to do about it? The problem remains the same, i.e. we still do not know, how
to handle the problem properly since it can have arbitrary reasons. In this
particular case however, I don't see how "panicking" (i.e. re-connecting to
the broker) would be of any help. Since the exception listener registered on
the connection is the one registered by the RA (and the
ActiveMQSession.run() method can be sure of that since the run() method is
used by the RA only), I think we could just log the error and then silently
ignore the exception, don't you think? In other cases (i.e. in the rest of
the client code) the onAsyncException() strategy may be appropriate,
however.

Kai


rajdavies wrote:
> 
> 
> Hi Kai,
> 
> Thanks for the feedback and good description of the problem! The  
> problem is that the only mechanism to notify of an internal async  
> exception is through the Connection Exception listener - and and we  
> use this for both internal client exceptions - and actual transport  
> exceptions. However, I agree that this is erroneous - according to the  
> JMS API - onException() should only be called if there is a serious  
> problem with the Connection object itself.
> 
> We do call this from multiple places in the client side code -  
> normally to notify that there is a runtime exception from the  
> container (as in this case) or the application when consuming a  
> message asynchronously.
> 
> I think we need to add an additional method on the Connection for  
> registering an Exception listener for general client/application  
> exceptions
> 
> 
> cheers,
> 
> Rob
> 
> http://open.iona.com/products/enterprise-activemq
> http://rajdavies.blogspot.com/
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Handling-of-RuntimeExceptions-in-ActiveMQSession.run%28%29-method-tp17554360s2354p17556456.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Mime
View raw message