jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "johannes lechner" <Johannes.Lech...@consol.de>
Subject Jackrabbit Clustering
Date Tue, 14 Apr 2009 11:57:10 GMT
Dear Readers,


I got a question on clustering Jackrabbit. 

We use version 1.5.3. of Apache Jackrabbit along with the

We managed to use an oracle db for content saving, exactly like shown in the

Our Problem:

We tried to save content in one session  and read the content with another
session on a second server.

But it seems there are some synchronization problems.

So if one session uses "save" the other session should see this  changes by
calling "session.refresh(Boolean)", or I am wrong?

Is this the intended way to synchronize two sessions across the network?


We thought a  "session.refresh(true/false)" should work.

We looked around in springmodules and jackrabbit `s source code and we found
the following code lines.


Springmodules -> JcrTemplate:


                public Object execute(JcrCallback action, boolean
exposeNativeSession) throws DataAccessException {

                               Session session = getSession();

                               boolean existingTransaction =
SessionFactoryUtils.isSessionThreadBound(session, getSessionFactory());

                               if (existingTransaction) {

thread-bound Session for JcrTemplate");



                               try {

                                               Session sessionToExpose =
(exposeNativeSession ? session : createSessionProxy(session));

                                               Object result =

                                               // TODO: does flushing
(session.refresh) should work here?

                                               // flushIfNecessary(session,

                                               return result;




Jackrabbit -> ItemImpl:


    public synchronized void refresh(boolean keepChanges)

            throws InvalidItemStateException, RepositoryException {

        // check state of this instance



        if (keepChanges) {

            /** todo FIXME should reset Item#status field to STATUS_NORMAL

             * of all descendent non-transient instances; maybe also

             * have to reset stale ItemState instances */




        if (isNode()) {

            // check if this is the root node




Look at the code comments.

As you can see there are open issues, I am not sure if clustering depends on

So what is your current state of clustering, does it work well without sync

Can you give us any hints?


Thank you very much.



View raw message