1 Mar 2007 02:56
Re: A lot of listeners created from guestSession()
Andrew Jaquith <andrew.jaquith <at> mac.com>
2007-03-01 01:56:37 GMT
2007-03-01 01:56:37 GMT
>> background thread that worked like the lock reaper. If the >> SessionMonitor is not removing WikiSessions when the HttpSession >> expires, THEN IT IS A BUG. I believe we fixed such a bug >> (classcast exception) in 2.5.20. > > I thought so too but I'm currently using the latest CVS (maybe -1) and > still seeing tons of guest sessions. Will investigate further... Cool. I'd be curious to hear what you find; again, these things should be expiring themselves according to the container's settings. > I'd really prefer (1) as I have very low appreciation of > WeakReferences > right now -- they seem to me a sloppy way of approaching a problem, a > way of mopping up from the backend rather than simply being diligent > about cleaning up after oneself. Since they're weak we can't even rely > on them necessarily. I don't see that this future proofs anything, > maybe I'm not understanding you exactly. (I wouldn't -- myself > anyway -- > worry about future events we haven't thought of yet.) WeakReferences "future-proof" things in the sense that they protect against developers (like ourselves, it seems...) who don't always clean up listener lists. It's a defensive programming technique, and a fairly well accepted one at that. Remember that the events are MEANT to be listened to by classes that aren't necessarily core to JSPWiki. That's why the interfaces are public and documented (by you! thanks by the way). Third-party developers and end-users may NOT fully appreciate the memory implications of stashing listeners all over the place without cleaning them up. So, as much as you might(Continue reading)
RSS Feed