jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Pfister <dpfis...@adobe.com>
Subject Re: MicroKernel.getInstance
Date Wed, 11 Apr 2012 08:00:48 GMT

On Apr 10, 2012, at 6:32 PM, Jukka Zitting 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.

Sounds fine to me, +1

Cheers
Dominique

> 
> BR,
> 
> Jukka Zitting


Mime
View raw message