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
springmodules-jcr-0.8.

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

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) {

                                               logger.debug("Found
thread-bound Session for JcrTemplate");

                               }

 

                               try {

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

                                               Object result =
action.doInJcr(sessionToExpose);

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

                                               // flushIfNecessary(session,
existingTransaction);

                                               return result;

                               ...

 

____________________________________________________________________________
_____________

Jackrabbit -> ItemImpl:

------------------------------------------------------------------------

    public synchronized void refresh(boolean keepChanges)

            throws InvalidItemStateException, RepositoryException {

        // check state of this instance

        sanityCheck();

 

        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 */

            return;

        }

 

        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
them.

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

Can you give us any hints?

 

Thank you very much.

 

 


Mime
View raw message