ServletRequestListener #requestDestroyed(javax.servlet.ServletRequestEvent)
will be called. This caused that session replication was done before OpenWebBeans prepared the beans for the failover.
Therefore a new ServletFilter, which prepares the bean failover before session replication, was added in OpenWebBeans 1.1.4.
Just add it as FIRST filter in your web.xml:
org.apache.webbeans.web.failover.FailOverFilter
and map it for example to the FacesServlet.
Also don't forget the src/main/resources/META-INF/openwebbeans/openwebbeans.properties with following entries:
configuration.ordinal=100 org.apache.webbeans.web.failover.issupportfailover=true org.apache.webbeans.web.failover.issupportpassivation=true
Update for OWB 1.2.0 -> Click
Interesting, thanks for sharing. Do you know of any good tutorials/blogs on how to do session replication, clustering, load balancing with latest Tomcat or TomEE version?
ReplyDeleteJust read the tomcat docu about clustering, enable myfaces session serialization and OWB failover.
ReplyDeleteYou may also configure MyFaces state encryption if you use it, because the keys will be generated on startup otherwise.
Noted. Thanks.
ReplyDeleteDavid Blevins was encouraging me to run 2 copies of the web app on one server and create a L2 cache; I'm assuming/hoping that both copies of the web app are hitting the same database.
This is something I want to do, ASAP, and I have already started reading/researching this, and that includes the tomcat cluster session replication documentation.
Thanks! This is very helpful.
ReplyDeleteYou have a typo openwebbans.properties
Also, how about adding "clustering" for a label (if that even effects search hits)
Done - Thanks!
ReplyDelete
ReplyDeleteVery Good contentcustom software development company
This comment has been removed by the author.
ReplyDelete