Philipp Bracher (JIRA) wrote:
[ http://jira.magnolia.info/browse/MAGNOLIA-765?page=comments#action_11774 ]
Philipp Bracher commented on MAGNOLIA-765:
------------------------------------------
The users content node and the hierarchymanagers are not serializable. This is
a well known problem since a long time and we should solve it definitly.
I don't know the details but if you cluster with sticky sessions it should work
(see appache tomcat connector).
Here are some possible solutions:
A) no hierarchymanagers and usernodes in sessions
I don't know the cost of createing a jcr session, but if this is not to
expensive we could make a ClusterableContext which stores the jcr- objects in
the request instead of the session
B) make the objects serializable
If a node get's serializabled it stores only it's handle (rest is transient).
The same we could do with the hierarchymanager. In fact this would leed
indirectly to the same solution as A (creating the objects per request)
C) Pool of hierarchymanagers
If the costs of creating a jcr session are to big we could implement a pool of
hierarchymanagers and they are initialized on a request base (AccessManager,
...)
This is not easy to achieve. And it is not just a matter of http session
failovers. You'd need jcr session failover to get this work.
Is B) suggesting to store a serialized hierarchy manager in the http
session?
A) and C) just won't work as desired. You will loose data when the power
of a clustered server is unplugged.
Even Communiqué is not clusterable in a proper way.
I might be missing something, though.
--
Cheers,
Michael
Session clustering failing
--------------------------
Key: MAGNOLIA-765
URL: http://jira.magnolia.info/browse/MAGNOLIA-765
Project: magnolia
Type: Bug
Components: core
Versions: 3.0 RC1
Environment: Any (linux, java 6)
Reporter: Nicolas Modrzyk
Assignee: Boris Kraft
I put in the magnoliaAuthor war into webapps
Then added <distributed /> to the Author webapps to enable clustering/session
failover
Also uncommented the Cluster setting as well.
I tried connecting to one of the Tomcat instances directly to double check
things are working
And found I could not connect to the Magnolia author at all
In catalina.out there is the following message:
ERROR info.magnolia.cms.filters.SecurityFilter
SecurityFilter.java(authenticate:120) 14.03.2006 16:28:39 Attribute
[mgnlUserNode] is not serializable
java.lang.IllegalArgumentException: Attribute [mgnlUserNode] is not serializable
at
org.apache.catalina.cluster.session.DeltaSession.setAttribute(DeltaSession.java:1229)
at org.apache.catalina.cluster.session.DeltaSession.setAttribute() ...
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------