jLibrary

Open Source Document Management System from your Desktop

  • Developers
  • Help & Support
  • Enterprise
  • Documents & Articles
jLibrary » Articles » Playing with Magnolia repositories guts with jLibrary

Information

Created in: 2006-01-14 12:45:35

Author: martin

Size: 6080 bytes

Last updated: 2006-01-14 12:45:35

Categories

Documents & Articles

You may be interested in...

There isn't related documents

Playing with Magnolia repositories guts with jLibrary

Anyone that has browsed over the jLibrary 1.0b4 new features could has seen that there is a brand new JCR browser. Well, this browser is really simple, but at least it serve us to browse over Jackrabbit compatible repositories. As Magnolia is a product that uses Jackrabbit as its backend, someone has asked me if it should be possible to browse Magnolia-based repositories using jLibrary. Well, the short answer for this question is no, but the long answer is yes, but it requires some work :-)

The problem is that jLibrary does not includes support for berkeley DB persistence manager ( the final version will include it ), so you have to add those libraries to open Magnolia repositories. The steps are really simple and are described here:

  • Go to the jLibrary installation directory. Browse to the dir $JLIBRARY_INSTALL_DIRECTORY/plugins/org.jlibrary.client_3.0.0/lib and copy the following .jar files:

    - geronimo-spec-jta-1.0.1B-rc4.jar
    - jackrabbit-bdb-1.0-20050928.220303-1.jar
    - je-1.7.1.jar

    You can find these libraries on $MAGNOLIA_WEBAPPS_DIRECTORY/magnoliaPublic/WEB-INF/lib directory. This files are which add berkeley db persistence manager support.

    Also, thanks to Alexander Popescu, I have detected a bug that locked all the JCR repositories when exit jLibrary. To fix it, simply download this file and copy it with the other ones:

    - http://www.jlibrary.sourceforge.net/magnolia/jlibrary-server.jar

  • The next step is edit the file $JLIBRARY_INSTALL_DIRECTORY/plugins/org.jlibrary.client_3.0.0/plugin.xml and you have add a few lines declaring those libraries. Here is an screenshot:



  • Finally, thanks also to Alexander I detected that my repository.xml configuration file was using a different version storage system than Magnolia one. Download the next file and overwrite with it the $MAGNOLIA_WEBAPPS_DIRECTORY/conf/repository.xml one:
    http://www.jlibrary.sourceforge.net/magnolia/repository.xml

  • Now, this is very important. If you have run jLibrary previously, you have to remove the Eclipse RCP caché to get active the changes we did in plugin.xml file. You can do this removing all the directories (only the directories) of the $JLIBRARY_INSTALL_DIRECTORY/configuration directory. Another way to do this is to edit the jLibrary link on the start menu and add the -clean parameter. Do whatever you prefer.

  • Ok. And that was all. :-) Now, run jLibrary. Remember that you must use the link on the start menu as it contains several important parameters. Then choose the open directory wizard. As you're going to load a repository from your hard disk, you must first create a new server profile. That server profile must be pointing to the place where the magnolia repository is located. After introducing the data of the server profile, you must enter the repository name and the user and password data. Here are the secreenshots with the data I used for this sample:





    As you see, I opened the repository located at %MAGNOLIA_WEBAPPS_DIRECTORY%/magnoliaPublic/repositories/website. The repository name is default, and the user and password is superuser/superuser at least if you have not changed default Magnolia installation. Also, it is very important that you check the last checkbox. If you don't check this checkbox, the repository won't be opened correctly. After this, you only have to press Finish button.

    One last note: I detected that Linux version does not display correctly the last check box. If you are running from Linux, then you should try to enlarge the height of the dialog to make the checkbox visible. :( Too bad, but I don't have many time to maintain the software on two platforms.

  • And voilá. jLibrary will open your Magnolia repository:


    (click on the image to enlarge)

And now, what?

It wasn't hard, wasn't it? Well, now, what can you do with jLibrary againstMagnolia repositories? Really not much. You can browse repository information, see the internal structure, look at magnolia guts i.e. learn how it storages information, browse nodetypes, see page properties, etc... Well, this also can be useful if you want to use Magnolia repository data directly from your applications using a JSR-170 compliant API.

Well, there are many possibilities starting from this point. Maybe someone could be interesting on adding a bridge between Jackrabbit and jLibrary. I don't have enough time for this, but I'm sure that it won't be a hard task. So, doing this you could have all the advantages of jLibrary for managing your Magnolia repositories, and all the advantages of Magnolia CMB but easily handling information with jLibrary from your desktop.

I have done the first step. :-) Any volunteers?

 

Copyright © 2004-2006 Martín Pérez Mariñán & others. Created with jLibrary. Design by Andreas Viklund.

Eclipse, Built on Eclipse and Eclipse Ready are trademarks of Eclipse Foundation, Inc.

SourceForge.net Logo Donate to this project
Built on EclipseTM RCP Hosted at sourceforge.net