jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mueller <muel...@adobe.com>
Subject Re: MicroKernel.getInstance
Date Wed, 11 Apr 2012 11:57:38 GMT
Hi,

>So how would this work? Do I do something like this:
>
>    MicroKernelManagerFactory factory = getFactoryFromSomewhere();
>    MicroKernelManager manager = factory.getManager("something");
>    try {
>        MicroKernel mk = manager.getMK();
>        // use the mk
>    } finally {
>        manager.dispose();
>    }

Yes.

>How is this better than:
>
>    MicroKernel mk = getMicroKernelFromSomewhere();
>    // use the mk

Obviously, the dispose() call is missing in the second code.

Do you think this is not needed?

Regards,
Thomas


Mime
View raw message