Has anyone come across a problem with MyFaces appplications in clustered
environments where action events are not queued when another cluster node
picks up the next request for a given session?

I'm having a problem with MyFaces 1.1.1 (and Tomahawk 1.1.1) in a Websphere
6.0 environment that is clustered using Websphere's Database Distributed
Sessions mechanism.  Websphere is configured to serialize the complete
HttpSession after every request and store it in a database that all cluster
nodes have access to, thus ensuring all changes to the session are available
to all nodes in the cluster.

The user clicks on a <h:CommandLink> bound to an action that does some work,
and should then navigate to a different page.  The backing bean in questions
has request scope.

In the normal course of events MyFaces 1.1.1 appears to queue the action
event during the processDecodes step of the Apply Request Values phase.  It
appears to do this by stepping through the component tree (restored during
the Restore View phase) looking for any component that implements UICommand
and has an id matching the "form1:_link_hidden_" parameter value from the
HTTPServletRequest.  If it finds a matching component it looks at the action
binding and queues an event to call the appropriate method during the Invoke
Application Phase.

The problem occurs when a cluster node is restarted between requests for a
given session (or another node picks up that session).   The cluster node
successfully de-serializes the HttpSession and starts to process the
request.  MyFaces appears to successfully restore the view state from the
de-serialized HttpSession, however in the Apply Request Values phase the
action event bound to the command link does not get queued and so MyFaces
continues through the lifecycle to the Render Response phase and the user
sees the original page rather than the page they were expecting.

I've checked that the entire HttpSession object graph is serializable, and
the de-serialized session contains the changes from the previous request
(thus ruling out WAS serialization/deserialization issues).

What else (if anything) could cause this behaviour?

Thanks,
Duncan
-- 
View this message in context: 
http://www.nabble.com/h%3ACommandLink-Action-Event-not-triggered-after-cluster-restart-tf4149227.html#a11803756
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to