Suppose we have a web application which uses stateful session beans, and we have
HttpSessionListener like this:
| public void sessionDestroyed(HttpSessionEvent event) {
| event.getSession().getAttribute("sfsb").remove(); // Make sure to call
SFSB's @Remove method
| }
|
This behavior is what Seam does.
The HttpSessionListener.sessionDestroyed() would be called in session invalidation,
session timeout and during redeploy/shutdown for cleaning up local resources. This happens
in both cases, clustered and non-clustered .
However, in clustered environment, the sfsb.remove() method call in HttpSessionListener
becomes a cluster-wide operation. So when we shutdown one node, HttpSession is still
available on the other node for fail over but SFSB is missing.
I don't think the application is doing something wrong. Possible solution is to
separate the node from cluster before applications undeploy. This makes the sfsb.remove()
method call local-only.
Thoughts?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164658#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...