jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: MicroKernel.getInstance
Date Wed, 11 Apr 2012 07:44:19 GMT
On Tue, Apr 10, 2012 at 6:32 PM, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> Hi,
>
> On Tue, Apr 10, 2012 at 5:23 PM, Julian Reschke <julian.reschke@gmx.de> wrote:
>> Proposal: rename to "locator".
>
> Alternative proposal: Get rid of MicroKernelFactory entirely.
>
> Components that need to instantiate a MK implementation should
> directly use the appropriate constructor or other
> implementation-specific instantiation mechanism. That way whoever
> starts the repository or the MK instance is clearly in charge of also
> shutting it down when appropriate. The current approach with the MKF
> and MK.dispose() doesn't properly address that issue.
>
> URL-based access or other lookups should IMHO only be used for cases
> where the repository has already been initialized and only a reference
> to it is needed. For such cases we should use JNDI, OSGi service
> references, or other existing mechanisms instead of a custom MKF
> interface.
>
> As an example of using such a solution, see the new
> AbstractMicroKernelIT class in oak-it-mk and the standard Java service
> provider mechanism it leverages.

+1 for jukka's proposal

cheers
stefan

>
> BR,
>
> Jukka Zitting

Mime
View raw message