Michael Aemisegger wrote:
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.

B) Yes we store a serializable hierarchymanager. The two magnolia classes Content and HierarchyManager wrap a JCR object. If you make the inner object transient, you should be able to restore those inner objects in the moment of deserialization.

A) and C) means. Don't store the objects in the session (perhaps the user name as a serializable string). Magnolia won't fail if the jcr-session is created request wise (with a pool for performance reasons maybe).

I think it should work but perhaps I simplify it to much.


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to