I was doing some other developing for some time but now found the time to go further with
the clustering. I got it working and have some comments:
One has to distinquish between traditional JSF-apps and JBoss SEAM apps clustering is
different depending on the platform used. JBoss SEAM keeps the stateful managed beans in
the EJB3 layer which must be some thing the JSF will consider later since it makes good
sense: it is a better strategy to keep stateful session data in a stateful ejb since then
the app server can do what it is best at at the appropriate "level".
BUT since my app is a traditional JSF app I could figure (from the JBoss Portal docs) that
I would have to "touch" my managed beans in the session whenever I changed their
state. This has some implications since this is against what was intended in JSF.
If one bean has relations with another this relationship would normally be managed in the
faces-config.xml (by injection) but this would never call set attribute on the portlet
session when one changes the state on the
other.
And if a page needs info from a managed bean in the session the JSF-framwork will generate
a new empty bean and place it in the session for the page to use. This first bean creation
will call setAttribute a cause session replication whereas other state changes only will
appear as mutator calls on the bean in mention.
I know that JBoss tomcat replication now has the POJO replication but don't really
know how this relates to the JBoss Portal session listener.
My solution is to have a bean handler that will fetch beans from the session and that will
release these again by calling set attribute on the portlet session for the bean that had
a state change. Much like the session interceptor used by JBoss Portal. And this worked.
So know I have portlet implemented using traditional MyFaces that really is clustered.
I still use my custom MyFaces generic portlet but the other issue I mentioned above
(
http://jira.jboss.com/jira/browse/JBPORTAL-1094) wasn't really an error in the JBoss
Portal (sorry about that Julien Viet) merely code that at first sight looked a bit
suspecious.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983412#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...