jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: BindableRepository
Date Mon, 05 Dec 2005 09:54:14 GMT
personally I think applications should only use a shared repository that 
is deployed as a resource. either through some standard mechanism such 
as RARs or some proprietary servlet engine mechanism.

e.g. use the jca contribution in jackrabbit.

In any case, the servlet engine or the application server should control 
the life cycle of the repository (resource) and not the application 
itself. (unless the repository is embedded into the application).

regards
  marcel

Alexandru Popescu wrote:
> Hi!
> 
> I have been reading about the decissions around the BindableRepository 
> and why or why not make it package vs public level.
> 
> I was wondering how to handle the following scenario:
> 
> 2 applications A & B using a shared repository
> application A starts the repository
> application B retrieves it through JNDI
> application A is shutdown for maintanance (the repository shouldn't be 
> closed, still being used by B)
> JVM is shutting down
> 
> This results imo in a not-shutdown repository.
> 
> IMO a better approach would be to have the BindableRepository public and 
> its shutdown public, so that every application relying on it can `try´ 
> to close the repository. I am saying `try´ because the 
> BindableRepository should be able to find out if it is still referenced 
> and trigger the RepositoryImpl.shutdown only when the last referencing 
> application is triggering the shutdown.
> 
> Please let me know what do you think about this. If you agree with this 
> scenario I can (almost) immediately provide the patched version.
> 
> thanks in advance,
> 
> ./alex
> -- 
> .w( the_mindstorm )p.
> 
> 
> 


Mime
View raw message