-
1. Re: MBean as a Listener
tom.elrod Feb 3, 2006 3:35 PM (in response to vassilk)First off am not sure why you are not seeing an exception when making the following call:
client.removeListener(listener);
Upon making this call on the client, the client will remove the listener from the callback server and the target server. Since the callback server has been destroyed, should get a org.jboss.remoting.CannotConnectException thrown.
Just to make sure there wasn't a bug with disconnecting callbacks, I wrote a test case to verify that once callback listener is removed and the callback server is destroyed, that no more callbacks are delivered (based off the code you posted in the forum).
The test classes are org.jboss.test.remoting.callback.push.disconnect.CallbackTestClient and org.jboss.test.remoting.callback.push.disconnect.CallbackTestServer.
The test passes on my machine with latest remoting codebase. Also, was able to debug to make sure that there were no threads left over that shouldn't be and there were not.
If you still think this is an issue, please open a jira issue and supply a test case demonstrating the bug.
Thanks.
-Tom