Hi Scott!

It seems that different servlet containers have different ways on
whether to invoke the session listeners when session is transferred to
a different node than where it was last accessed. I agree with you
that the Servlet spec is not very clear on this. It also seems that
different developers have different opinions about what is the correct
way. Of course the way that solves their issues at hand seems the
correct one :-) Could it be possible to add a configuration, like
Tomcat's notifySessionListenersOnReplication to let the developers
decide are the SessionListeners called or not? This would make it
possible to interpret the servlet spec whatever way needed :)

In my opinion, the HttpSessionListener's sessionDestroyed method
should only be called when the session (cluster-wide) ends. Otherwise,
it is really hard to code any logic to release resources that are held
during the user session. I'm not so sure about the
HttpSessionBindingListener's valueUnbound, but maybe it should work
the same way as the other session listener does.

regards,

Kai

2007/11/2, Scott Ferguson <[EMAIL PROTECTED]>:
>
> On Oct 31, 2007, at 6:44 AM, Kai Virkki wrote:
>
> > And to add to this, I noticed that in my cluster setup, both
> > valueUnbound and sessionDestroyed get called when i shutdown the Resin
> > node that the session is currently on. I don't think this is
> > appropriate since the user's session will continue fine on the other
> > Resin node. I have a problem here, because I need to release some
> > resources when user session REALLY ends, not when one of the nodes
> > dies.
>
> I've added this as a bug report, but the main problem is that there
> are really two cases that matter.
>
> First, when the value/session is removed in memory (e.g. to handle
> JVM-specific stuff like Sockets).
>
> Second, when the session is totally removed.
>
> The servlet api doesn't really handle persistent sessions well.  It's
> mostly centered around a single JVM.  So valueUnbound means the
> attribute is removed from the session instance (case #1).
> SessionDestroyed is even more complicated.
>
> -- Scott
>
> >
> > Is there any work-around for this weird Resin behavior?? How can I
> > listen to the session FINALLY ending in a cluster??
> >
> > regards,
> >
> > Kai
> >
> > 2007/10/31, Kai Virkki <[EMAIL PROTECTED]>:
> >> Hi!
> >>
> >> I noticed that the issue with unBound being called is fixed from
> >> 3.1.2 -> 3.1.3.
> >>
> >> 0001820: valueBound isn't called on load from persistent store
> >> anymore
> >> but valueUnbound still is called on save
> >>
> >> We have the same problem on 3.0.23. Could it be fixed to the
> >> production branch too?
> >>
> >> best regards,
> >>
> >> Kai
> >>
> >
> >
> > _______________________________________________
> > resin-interest mailing list
> > resin-interest@caucho.com
> > http://maillist.caucho.com/mailman/listinfo/resin-interest
>
>
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
>


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to