[jboss-user] [JBoss Messaging] - How to Intercep a client close on the server side

jhowell@redhat.com do-not-reply at jboss.com
Wed Mar 25 11:28:49 EDT 2009


JBM 1.4.0 sp3 CP04

If I want a notification on the server side that a connection has been closed(either called close on the connection or closed due to network error), how do you get a server notification.

I've tried to use the aspects, but the connection advised doesn't get called when the connection is shut down due to error.

My last option is to do runtime weaving and use an aroundinvoke around handleConnectionException in the SimpleConnectionManager

Since the flow calls close and closing on the  and does not call the connectionAdvised, it seems like this is a bug.  Shouldn't the connectionAdvised get called in the event of a client failure.  I would think that on the server side methods for closing and close should be called for the connectionAdvised.  It seems like a bug, but I can also see it the other way...  The code fix for the bug would be to wrap the endpoint in the connectionAdvised and call that in the SimpleConnection in cleanupForSessionID instead of calling the endpoint directly.

Jay:)



View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4220956#4220956

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4220956



More information about the jboss-user mailing list