jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: problem after populating the repository
Date Tue, 11 Aug 2009 08:51:38 GMT

On Mon, Aug 10, 2009 at 10:30 AM, simer anand<simer.anand88@gmail.com> wrote:
> Now i need to know that when we run the SecondHop program then nodes
> were created and data was sent and retrieved according to the program.
> but this program must be communicating with the repository created by the
> FirstHop program so is there any way to create a link between Second Hop
> program nodes for storing and retrieving data stored in workspace.xml in
> Jackrabbit folder in Tomcat's Bin directory.

The TransientRepository class you are using is giving you the new
repository. If you want to access the repository you've already
populated using the webapp, you have two options:

1) Once you have closed the webapp, you can access the underlying
directory directly by giving the TransientRepository class two
arguments, first the path to the repository.xml configuration file
created by the webapp and the second to the repository directory.

2) If you want to keep the webapp running, you can access the
repository remotely using the JCR-RMI layer. Make sure that you've
included the jackrabbit-jcr-rmi jar (you can find it in WEB-INF/lib of
the webapp) in your classpath, and replace the TransientRepository
instantiation with: new
You can import the URLRemoteRepository class from the
org.apache.jackrabbit.rmi.repository package.


Jukka Zitting

View raw message