Hello Mark,

you are right, sorry for misinterpreting the spec.

What I am now doing is, for each session I set an instance of a custom HttpSessionActivationListener implementation as an attribute. This works, at least if the Listener is implemented as a normal (outer) class.

If I implement it as an inner class, Tomcat behaves strangely. It tries to serialize/deserialize the class containing the Listener instead of the Listener itself, which raises an exception because the containing class is not Serializable. Is this normal?

Aside from that, wouldn't it be nice of the servlet spec would allow binding HttpSessionActivationListeners to the whole application instead just to an attribute? In my application, it would be much elegant/easier. Maybe I should suggest that to the servlet spec commitee...

When I was browsing the Servlet Spec 2.4, I stumbled over another (unrelated) issue. SRV.10.6 states: "Some exceptions do not occur under the call stack of another component in the application. An example of this is a SessionListener...". Doesn't this mean that SessionListener callbacks are never called from another component in the app? This it not true for Tomcat 5.0.19, because I've seen it calling sessionDestroyed when I was calling session.getAttribute() or session.setAttribute(). Could this be a violation of the spec? What do you think?

Regards,

Andreas


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to