jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: Model-2 Deployment example and test app [Fixed, with suggestions for updated docs]
Date Wed, 15 Feb 2006 10:07:12 GMT

On 2/15/06, Mark Slater <lists@humanesoftware.com> wrote:
> It seems there's an interface in org.apache.jackrabbit.api called
> JackrabbitRepository. Its only method is the prototype for the
> shutdown() method that needs to be called.

That's true. We added the JackrabbitRepository interface just recently
as a public interface for the Jackrabbit-specific extension on the
standard JCR Repository interface.

> I tried changing BindableRepository implement that, and made the
> method made public. When I did my web app could cast the object
> it got from the JNDI context to a JackrabbitRepository and things
> worked just fine.

That's a possible approach, but there is a conceptual problem with
taking a JNDI resource and shutting it down explicitly. For example
you might want to later on change the deployment model in which case
your application would no longer be in charge of shutting down the
repository. A better alternative would be to either directly
instantiate and shutdown the repository directly within the web
application or to add support for the TransientRepository class in

I agree that the existing documentation doesn't cover these issues
very well. I hope that this discussion leads to improvements for these
issues. :-)

PS. See the Jira issue JCR-245 (and the related issues) for backround
on the TransientRepository class and repository shutdown problems.


Jukka Zitting

Yukatan - http://yukatan.fi/ - info@yukatan.fi
Software craftmanship, JCR consulting, and Java development
View raw message