jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astra123 <sandhya.jayachand...@tcs.com>
Subject Re: Getting the error while trying to access the repository thru jcr-RMI concept
Date Thu, 07 May 2009 02:28:20 GMT

Hi,

Thanks for your response.

you have told something about the JackRabbit-standalone in your reply.
Can you please explain that part in detailed manner.

Because im new to jackrabbit and cant get you clearly.

Thanks,



Alexander Klimetschek wrote:
> 
> On Wed, May 6, 2009 at 1:27 PM, astra123 <sandhya.jayachandran@tcs.com>
> wrote:
>> The code which i used to register my repository with RMI is :
>>
>>           String configFile = "repository.xml";
>>            String repHomeDir = "repository";
>>            Hashtable env = new Hashtable();
>>            env.put(Context.INITIAL_CONTEXT_FACTORY,
>> "org.apache.jackrabbit.core.jndi" +
>> ".provider.DummyInitialContextFactory");
>>            env.put(Context.PROVIDER_URL, "localhost");
>>            InitialContext ctx = new InitialContext(env);
>>            RegistryHelper.registerRepository(ctx,
>>                                                 "repo",
>>                                                   configFile,
>>                                                     repHomeDir,
>>                                                      
     true);
>>            Repository r = (Repository) ctx.lookup("repo");
>>            String name="rmi://localhost:8084/repo";
>>            RemoteAdapterFactory factory = new ServerAdapterFactory();
>>            RemoteRepository remote = factory.getRemoteRepository(r);
>>            //making RMI binding
>>            Naming.bind(name, remote);
> 
> You need to start the RMI server under port 8084. The name would then
> only be "repo" AFAIK. Starting RMI is covered on the web. Here is the
> code of the Jackrabbit webapp doing this, see method "registerRMI"
> (but note that it covers many cases and might not be the simplest code
> snippet):
> 
> http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java?view=markup
> 
> To avoid having to write that code, you could run
> jackrabbit-standalone, which integrates the Jetty servlet container
> and starts the Jackrabbit repo + the Jackrabbit webapp with a simple
> double-click (of the jar). Or you could put the webapp in your
> favorite servlet container. But this only makes sense if you want to
> run Jackrabbit in a webapp context ;-)
> 
> Regards,
> Alex
> 
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Getting-the-error-while-trying-to-access-the-repository-thru-jcr-RMI-concept-tp23404753p23419165.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message