[high availability] session replication error with richfaces
six-p4ck Jan 9, 2009 10:45 AMHello all.
Thx to have answer to my older question first about dev in richfaces.
Now my application is fine (i think) and i can make run my web-app JSF with richfaces and my EJB3.
I have a ear file who i can deploy easy on one JBOSS server.
Now i need to make my app in high availability. (sorry a little network but it's for have a good explanation)
For make this i use 2 way:
1. I use a apache balancer to do session afinity.
Sample: one new HTTP request come on my apache balancer (192.168.0.1)
apache look the session ID and remember than all request with this session ID is routed to the first JBOSS app (192.168.0.100).
A other new HTTP request, new sessionID, and he forward to other JBOSS app (192.168.0.101)
If one of my JBOSS app is down, apache send all request to other JBOSS app
This work fine but i need to do session replication.
sample: if one of my JBOSS app crash, i dont want the user is disconnected or see error message. He must be switch on other JBOSS app without user see anything.
i can make this like sample here: http://www.mastertheboss.com/en/jboss-application-server/48-jboss-clustering-web.html
But when i try to make the same with my appli i have error with richfaces.
I have no probleme with another appli without richfaces.
error message:
type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: setAttribute: Non-serializable attribute javax.faces.webapp.FacesServlet.service(FacesServlet.java:277) org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390) org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) root cause java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute org.jboss.web.tomcat.service.session.ClusteredSession.setAttribute(ClusteredSession.java:555) org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130) com.sun.faces.context.SessionMap.put(ExternalContextImpl.java:971) com.sun.faces.mgbean.BeanManager$ScopeManager$SessionScopeHandler.handle(BeanManager.java:442) com.sun.faces.mgbean.BeanManager$ScopeManager.pushToScope(BeanManager.java:417) com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:369) com.sun.faces.mgbean.BeanManager.create(BeanManager.java:222) com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:88) javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53) com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72) org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:45) org.apache.el.parser.AstValue.getTarget(AstValue.java:42) org.apache.el.parser.AstValue.invoke(AstValue.java:127) org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68) javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) javax.faces.component.UICommand.broadcast(UICommand.java:387) org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321) org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296) org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253) org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466) com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390) org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
I think they are richfaces objet no serializable in session (in my app i just put user and he is serializable). possible?
Is it possible to make session replication with richfaces?
If yes, how?
very thanks.