You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Alessandro Bologna <al...@gmail.com> on 2007/06/29 16:10:36 UTC

WebApp, Tomcat5.5 and JNDI

Hi,

I have been struggling with this for a while. If I start a repository with
jackrabbit-webapp.war (because I need the webdav server), and I want to
access the Repository object from another application deployed as another
war file, in Tomcat 5.5, how do I do it? The wiki suggestions don't really
help, because in this case the RepositoryStartupServlet uses the
DummyInitialContextFactory and not the bindable one.
Does anybody have a solution that "just works"?

Thanks
Alessandro Bologna

Re: WebApp, Tomcat5.5 and JNDI

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 6/29/07, Alessandro Bologna <al...@gmail.com> wrote:
> I have been struggling with this for a while. If I start a repository with
> jackrabbit-webapp.war (because I need the webdav server), and I want to
> access the Repository object from another application deployed as another
> war file, in Tomcat 5.5, how do I do it? The wiki suggestions don't really
> help, because in this case the RepositoryStartupServlet uses the
> DummyInitialContextFactory and not the bindable one.
> Does anybody have a solution that "just works"?

The problem is that Tomcat doesn't allow a webapp to write the parts
of the default JNDI tree that are available to other applications. You
could work around that by putting DummyInitialContextFactory in a
shared classloader along with the JCR API jar file.

Another, more elegant option would be to use the cross-context
attributes as implemented in the jackrabbit-jcr-servlet component that
unfortunatley hasn't yet been released.

BR,

Jukka Zitting