JBREM-954
First things firts, I believe that Remoting and AS as a whole, in the context of an EJB
application, is a library and hence should not swallow the interruption request and
instead rethrow it. I think everyone agrees on that.
I've meaning to start a topic on this due to the ramifications it has on the
UnifiedInvokerHAProxy. In principle, resolving JBREM-954 should be simple, i.e. rethrowing
InterruptedException (or some form of it - IE for abbreviation) instead of
CannotConnectException.
Main issue here is that, from UnifiedInvokerHAProxy's point of view, it throws back an
IE as it is. So, if UnifiedInvokerHAProxy did nothing about it and threw it back as it is,
unless the EJB declared that it could throw an IE, the client would get a
java.lang.reflect.UndeclaredThrowableException wrapping the IE.
This is not nice and I don't think we can expect for all EJBs to declare IE. The
cleanest solution I can think of is for either Remoting or the Unified invoker layer to
rethrow an IE wrapped inside a RuntimeException and let the users deal with it
appropiately. The unified invoker ha proxy does not differenciate between IE or RE, so we
would be able to cope with both situations. Seeing that we already do some exception
laundering in the Unified invoker HA proxy, I'd probably go for the laundering of IE
into RE wrapping IE to happen there.
Thoughts?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145783#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...