has anyone tried to cluster CDI applications?
Today i tried clustering with @SessionScoped CDI beans but it doesn't work.
I also wrote an email to the OWB mailing list, how the beans with CDI
are stored in the session:
"OWB stores @SessionScoped beans in an in-memory map of
SessionContext's that is keyed off the session id.
I believe the FailOverService will later store those SessionContext's
as a session attribute in the session as part of the
FailOverBagWrapper at the end of each request. It should then
serialize/restore as appropriate when the session is serialized."
Is there anyone who tried this before?
Thanks :)
Thomas
which msm serialization strategy are you using? Have you tried java
serialization?
Cheers,
Martin
--
Martin Grotzke
http://www.javakaffee.de/blog/
Cheers,
Martin
Cheers,
Martin
On Thu, Feb 17, 2011 at 12:32 AM, Martin Grotzke
i still using Non-Sticky sessions and Kyro serialization. I will try
to use Java serialization this morning.
Thomas
2011/2/17 Martin Grotzke <martin....@googlemail.com>:
2011/2/17 Martin Grotzke <martin....@googlemail.com>:
If this does also not work I suggest that you put together a simple
sample of what you're trying to do as a clone of
https://github.com/magro/msm-sample-webapp/tree/simpleservlet
on github so that we can check together what's missing for OWB support.
Cheers,
Martin
Thomas
2011/2/17 Martin Grotzke <martin....@googlemail.com>:
Cheers,
Martin
2011/2/17 Martin Grotzke <martin....@googlemail.com>:
Cheers,
Martin
On Thu, Feb 17, 2011 at 11:13 AM, Thomas Andraschko
Cheers,
Martin
I realized that failover support was not really activated, as there
are several openwebbeans.properties loaded, and afterwards sorted by
their configuration.ordinal.
Just set it to e.g. 100 and the changes for
org.apache.webbeans.web.failover.issupportfailover and
org.apache.webbeans.web.failover.issupportpassivation will be active.
Unfortunately, now there's a ViewExpiredException:
Feb 17, 2011 2:41:37 PM org.apache.myfaces.shared_impl.util.StateUtils
reconstruct
SEVERE: View State cannot be reconstructed
javax.faces.FacesException: javax.faces.application.ViewExpiredException
at org.apache.myfaces.shared_impl.util.StateUtils.decrypt(StateUtils.java:496)
at org.apache.myfaces.shared_impl.util.StateUtils.reconstruct(StateUtils.java:378)
at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getSavedState(HtmlResponseStateManager.java:213)
at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getState(HtmlResponseStateManager.java:160)
at org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.restoreView(DefaultFaceletsStateManagementStrategy.java:148)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:388)
at org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(FaceletViewDeclarationLanguage.java:1438)
at org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:278)
at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:83)
at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:123)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:171)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
at org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.java:108)
Not sure what's the problem here, it will need some debugging to find
the issue or some help from google or the myfaces guys.
For now I need to get back to daily business, if you need any help let me know.
Cheers,
Martin
On Thu, Feb 17, 2011 at 12:33 PM, Thomas Andraschko
Cheers,
Martin
2011/2/18 Martin Grotzke <martin....@googlemail.com>:
Perhaps it's an option to pull in OWB devs to have a look at this?
Otherwise probably it takes some time to understand OWB injection
internals to figure this out.
Perhaps providing a ready to use setup with msm included and a good
description is s.th. they's accept.
Cheers,
Martin
2011/2/18 Martin Grotzke <martin....@googlemail.com>:
I just played with the myfaces-example-simple20-1.1.10.war from
tomahawk-examples-1.1.10-bin
(http://archive.apache.org/dist/myfaces/binaries/) and got the
"Schedule with sample entries" (/schedule1.jsf) to work after adding
USE_ENCRYPTION=false to web.xml:
<context-param>
<param-name>org.apache.myfaces.USE_ENCRYPTION</param-name>
<param-value>false</param-value>
</context-param>
Also after restarting a tomcat the session is picked up correctly, no
exceptions.
Cheers,
Martin
On Fri, Feb 18, 2011 at 7:58 PM, Thomas Andraschko