My original patch does use WebBeanConfigurationLister, but that requires 2 attributes to be set on a sessionContext, one is WebBeanConfigurationLister itself which will receive HttpSessionActivationListener callbacks, the problem is that it could not hold any session specific data for serialization. The other is the FailoverBagWrapper/FailoverBag which holds serializable data for the session.
For failover, the container I use, it supports time-based failover (serialize a session to another JVM every X seconds) or request based failover (serialize a session when every request is done). So I need at least FailoverBagWrapper/FailoverBag attribute being set on the sessionContext to be ready for serialization at any time. The sessionWillPassivate() is NOT invoked for the failover case since the current session will continue handling requests on the current JVM. SessionWillPassivate only be invoked when I gracefully shut down a server. In the end, I make another change to move HttpSessionActivationListener to FailoverBagWrapper, only use one attribute on the sessionContext and WebBeanConfigurationLister's HttpSessionActivationListener is not used. I could revert it back since both work for me. BTW, BeanManager, Interceptor, Decorator, resources beans are not working yet. I will fix these later.. From: Gurkan Erdogdu <[email protected]> To: [email protected] Date: 08/12/2010 11:11 AM Subject: Re: Failover Service +1, what I was trying to say :) ________________________________ From: Mark Struberg <[email protected]> To: [email protected] Sent: Thu, August 12, 2010 6:08:25 PM Subject: Re: Failover Service What about moving this function to the already registerd WebBeansConfiguarionListener? LieGrue, strub ----- Original Message ---- > From: Gurkan Erdogdu <[email protected]> > To: [email protected] > Sent: Thu, August 12, 2010 5:01:37 PM > Subject: Failover Service > > Hello Ying, > > How does failover service work ? FailoverBagWrapper implements > HttpSessionActivationListener, I think that to use failover service, we add > listener to web.xml ? > > > Is it possible to update code to use WebBeansConfigurationListener for > sessionWillPassivate and sessionDidActivate methods instead of > FailoverBagWrapper? > > thanks > > --Gurkan > > >
