jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Wilson" <mwil...@imageworks.com>
Subject RE: Deployment Model 2 questions
Date Thu, 08 Dec 2005 00:53:16 GMT
Ok, I've got a Model 2 devlopement setup of Jackrabbit running in my
Tomcat 5.5 server.  I would now like to write a small bit of Java code
to checkin/out a file and maybe display a little tree view of the asset
tree in Swing, any examples out there to simulate a remote client?  Do I
use RMI?

Mike

-----Original Message-----
From: Edgar Poce [mailto:edgarpoce@gmail.com] 
Sent: Sunday, December 04, 2005 6:46 AM
To: jackrabbit-dev@incubator.apache.org
Subject: Re: Deployment Model 2 questions

Hi alexandru,

Alexandru Popescu wrote:
> [quote]
>  Place the Jackrabbit jar file and all the dependencies (including the

> JCR API jar file) under [Tomcat folder]/common/lib.
> [/quote]
> 
> Now my question is: is this really necessary? I am thinking that the 
> only jar file needed in the common/lib is the jcr jar.
> 

AFAIK, in order to run a shared jackrabbit instance all the classes must
be loaded by the same classloader. In Tomcat in can be achieved by
placing all the needed jars at the server level.

> Considering 2 applications accessing the shared JCR, only the first 
> one requesting from JNDI the repository will really need to provide 
> the jackrabbit classes.
I'm not sure, I haven't tested it but I guess you would get a
ClassNotFoundException if you try this configuration. AFAIK if you
define a shared resource the shared jars must be placed under
${TOMCAT_HOME}/common/lib or any common path, see
${TOMCAT_HOME}/conf/catalina.properties#common.loader. The idea behind a
shared resource is that no webapp need to know anything about the
concrete implementation. Moreover in the scenario you are describing the
correct behavior of your webapps would depend in the order in which the
web applications are accessed, which doesn't seem to be a good option.

br,
edgar

ps, it's pretty much the same with other embedded resources.
e.g.
http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0508bad
er/
  (The enterprise scenario)
http://db.apache.org/derby/integrate/DerbyTomcat5512JPetStor.html

> thanks a lot in advance,
> 
> ./alex
> --
> .w( the_mindstorm )p.
> 
> 
> 
> 
> 
> [1]
> http://incubator.apache.org/jackrabbit/doc/arch/deploy/howto-model2.ht
> ml
> 



Mime
View raw message