jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Müller" <thomas.muel...@day.com>
Subject Re: remove JackrabbitRepository.shutdown()
Date Wed, 30 Apr 2008 12:07:52 GMT

>  I have no concerns about shutdown being in an interface as such
> I just object to putting it in a client-level interface.

We should have discussed that earlier...

> For example the
>  idea of a separate RepositoryManager interface that covers both
>  repository startup and shutdown is IMHO much better.

OK then let's do that. Technically it's not a problem. It's not the
most simple solution, but I understand your concern.

>  >  > [JCRLog] It doesn't cover  repository startup.
>  Sorry, doesn't cover the startup in a repository-independent manner.

It does up to some point, see RepositoryFactory.open.

>  Since JCRLog already has a dependency to jackrabbit-core

I hope it's just a compile time dependency. If not, it could be made
into a compile time dependency if required.

> and uses specific class references (TransientRepository) to start up a
>  repository, why should it have a generic mechanism for shutting the
>  repository down?

JCRLog is incomplete. Currently it's hard to use it because there are
still too many direct references to Jackrabbit classes in containers
and applications using Jackrabbit. Shutdown is one of them ;-)

>     public interface RepositoryMBean {
>         void startRepository() throws RepositoryException;
>         void stopRepository() throws RepositoryException;
>         boolean isRunning();
>         Repository getRepository();
>     }

That would be OK for me.

>     RepositoryMBean bean = new RepositoryMBeanImpl(/* config */);

This could be written as:

RepositoryMBean bean = RepositoryMBeanFactory.create(url);

The URL could be one of:

The RepositoryMBeanFactory doesn't need to know the classes
(RepositoryMBeanImpl,...). Instead, the Java service provider
interface can be used to load the classes, and the classes would
register themselves in the RepositoryMBeanFactory.


View raw message