Hi all!
I'd like to provide some feedback about this issue:
https://issues.jboss.org/browse/WELD-831
As a matter of fact I had to test a basic CDI application with a @SessionScoped Bean in a
cluster.
package com.sample;
import java.io.Serializable;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
@Named
@SessionScoped
public class UserBean implements Serializable {
int total;
public void sum() {
total++;
System.out.println("Total is "+total);
}
}
The application is fronted by an Apache 2.2 server running on a Win-Vista machine,
therefore I've defined the proxy-list statically in the mod_cluster configuration:
<subsystem xmlns="urn:jboss:domain:modcluster:1.1">
<mod-cluster-config advertise-socket="modcluster"
proxy-list="127.0.0.1:8888" sticky-session="true"
sticky-session-force="false" connector="ajp">
<dynamic-load-provider>
<load-metric type="busyness"/>
</dynamic-load-provider>
</mod-cluster-config>
</subsystem>
When I shut down the server node which has affinity to my session, I'm not able to
failover to the survivor node.
16:54:22,931 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host]]
(ajp-/127.0.0.1:8009-1) Exception sending request initialized lifecycle event to listener
instance of class org.jboss.weld.servlet.WeldListener: java.lang.IllegalStateException:
Error restoring serialized contextual with id
org.jboss.weld.bean-jsf.war/C:/EAP/EAP-6.0.1/NodeB/jboss-eap-6.0/standalone/deployments/jsf.war/WEB-INF/classes-ManagedBean-class
com.sample.UserBean
The same application, using JSF annotations (javax.faces.bean.SessionScoped), works fine.
The tested environment is EAP 6.0.1 (AS 7.1.2)
Is there any workaround for this issue ?
Thanks
Francesco