jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <michael.due...@day.com>
Subject Re: Jackrabbit management API
Date Tue, 08 Sep 2009 08:38:34 GMT
> [C] == Shutdown using Factory.getRepositoryManager(Repository).shutdown ==
> 
> 1) Properties parameters = ...
> 2) String factoryClass = parameters.remove("factory").toString();
> 3) RepositoryFactory factory = (RepositoryFactory)
> Class.forName(factoryClass).newInstance();
> 4) Repository rep = factory.getRepository(parameters);
> 5) if (factory instanceof JackrabbitRepositoryFactory)
> ((JackrabbitRepositoryFactory)
> factory).getRepositoryManager(rep).shutdown();
> 

Or more general:

5) if (factory instanceof RepositoryManagerFactory)
((RepositoryControllerFactory)
factory).getRepositoryManager(rep).shutdown();

with

interface RepositoryManagerFactory {
   RepositoryManager getRepositoryManager(Repository r);
}

Michael



Mime
View raw message