Dashboard > Community Wiki > ... > Deployment > Changing Jackrabbit PersistenceManager
Changing Jackrabbit PersistenceManager Log In View a printable version of the current page.

Added by GrĂ©gory Joseph , last edited by Boris Kraft on Jun 23, 2008  (view change)
Labels: 

The current Magnolia 2.1 is shipped with Derby DB as the default persistence manager. This distribution/combination has a bug when trying to run many Magnolia's on one (tomcat-)server. When initalizing the 5th instance of Magnolia on the same tomcat, it freezes, and Tomcat has to be killed.

To run more than 4 instances on a single tomcat, you can change the persistence manager to use the Berkeley database instead of the Derby database shipped by default.

Go to the

magnoliaAuthor/WEB-INF/config/default/repositories.xml
and changed the four repo's' config files from

<param name="configFile" value="WEB-INF/config/repo-conf/jackrabbit-derby-nosearch.xml" />

to (respectively)

<param name="configFile" value="WEB-INF/config/repo-conf/jackrabbit-bdb-nosearch.xml" />

You will get

java.lang.NoClassDefFoundError: com/sleepycat/je/EnvironmentConfig
unless you have the BerkleyDB jars (i.e. the embedded database). Go to http://berkeleydb.org and download the java DB.

Unzip the download, go into the lib, and copy the berkley jar into

magnoliaAuthor/WEB-INF/lib/je.jar

ATTENTION ! Do the same for magnoliaPublic!!

We use Derby instead of Bekley DB by default because the Berkley license does not allow us to distribute the jars directly with Magnolia, but you may download and use them.

Magnolia 3 Notes

Magnolia 3 uses a newer release of Jackrabbit which no longer ships with support for Berkeley DB. Alas, you must download the jackrabbit-bdb source, hack the project.xml file and build it yourself. You can checkout jackrabbit-bdb from svn here:

http://www.day.com/maven/berkeleydb/jars/

Then edit project.xml and change:

<currentVersion>1.1-SNAPSHOT</currentVersion>

to:

<currentVersion>1.0.1</currentVersion>

Now build jackrabbit-bdb with Maven 1. Isn't this fun? Now edit:

WEB-INF/config/default/magnolia.properties

and change:

magnolia.repositories.jackrabbit.config=WEB-INF/config/repo-conf/jackrabbit-derby-search.xml

to:

magnolia.repositories.jackrabbit.config=WEB-INF/config/repo-conf/jackrabbit-bdb-search.xml

Somewhere along the line something changed and we have to edit the individual repository configuration file, so edit WEB-INF/config/repo-conf/jackrabbit-bdb-search.xml and replace all instances of:

info.magnolia.state.berkeley.BerkeleyDBPersistenceManager

with:

org.apache.jackrabbit.core.state.bdb.BerkeleyDBPersistenceManager

Magnolia 3.0.3 Notes (Jackrabbit 1.3.1)

For those of you are interested in running Magnolia CE with Jackrabbit 1.3.1 and Berkeley DB I have just submitted patches to Jackrabbit so we can build the bdb-persistence project w/Jackrabbit 1.3.1:

https://issues.apache.org/jira/browse/JCR-1118

These patches should be applied to the bdb-persistence you can pull from SVN here:

http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/bdb-persistence/

In its previous incarnation on JspWiki, this page was last edited on Sep 13, 2007 6:25:44 PM by Magnolia
Other known authors include :

  • FerrisNicolaisen
  • BorisKraft
Powered by a free Atlassian Confluence Open Source Project License granted to Magnolia International. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators