On Tue, Apr 10, 2012 at 6:32 PM, Jukka Zitting <[email protected]> wrote:
> Hi,
>
> On Tue, Apr 10, 2012 at 5:23 PM, Julian Reschke <[email protected]> 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

Reply via email to