-
1. Re: Procedure to cleanly remove the listener?
tom.elrod Nov 7, 2006 3:23 PM (in response to sarbu)Sounds like you are talking about use of Client.addConnectionListener(ConnectionListener listener, int pingPeriod). Fom looking at latest remoting code base, after the connection notifier is fired so that all the ConnectionListeners are notified, the connection notifier is stopped, so should not receive any further notifications. Also, if call Client.removeConnectionListener(ConnectionListener listener) and is the only registered listener, will then also stop the connection notifier.
-
2. Re: Procedure to cleanly remove the listener?
sarbu Nov 8, 2006 1:07 PM (in response to sarbu)Hi Tom,
Yes, I am talking about Client.addConnectionListener(ConnectionListener listener, int pingPeriod).
The first time I get a connection lost notification event, I call disconnect on the client connector. I have noticed that if I do not remove the listener explicitly using the removeListener(listener) API I keep getting the notification for the connection lost. I just wanted to bring this up in case this has not been addressed yet.
Please note that I am using 1.4.0 version. We are far ahead in the current release that we cannot upgrade (but definitely upgrade is the priority in the next release).
Saravanan