anonymous wrote :
| So you just need to add a sychronized stop() method to the TimerTask which calls
cancel() and make sure you call this from your code - take a look at
org.jboss.messaging.core.plugin.postoffice.cluster.StatsSender which does something very
similar.
|
Coincidentally, I added just this sort of thing when I was working on the memory leaks
over the weekend, but, now that you brought it up again, I realize that it's not a
good idea, in this particular case. ControlMonitorTimerTask.shutdown() is called
indirectly from Client.removeListener(), and if ControlMonitorTimerTask.run() were
synchronized, shutdown could get hung up waiting for run() to do network i/o on failed
servers, undermining the "quick removeListener()" facility. I think the right
strategy is just to accept the possibility of a race and handle it gracefully. So
I've put just enough synchronization in run() to avoid NPE's.
anonymous wrote :
| Is a warning message really appropriate? A warning would imply something wrong or
strange - but this is to be expected.
|
Fair enough. Now that races are anticipated, I've downgraded the "missing client
invoker" messages to DEBUG.
anonymous wrote :
| FailoverValve is not currently used so I wouldn't worry too much about this. We
need to address this in the test suite.
|
Now you tell me :-) Good, I feel better now.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028250#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...