On 11.4.12 16:36, Jukka Zitting wrote:
Hi,
On Wed, Apr 11, 2012 at 3:32 PM, Thomas Mueller<[email protected]> wrote:
Do you think this is not needed?
Exactly.
So, it is not needed?
Only the code that creates the MicroKernel instance should ever call
dispose()
So, it is needed?
Sorry I don't understand.
AFAICT all cases where we actually need to start up MicroKernel
instances (instead of just accessing one) already know which
implementation class to construct and how to dispose it once no longer
needed. Thus I don't see the need for a generic interface for either
starting up or disposing MicroKernels.
Not sure whether this really is the case. However the number of
different Microkernel implementations is definitely low and the current
way of acquiring them via the MicroKernelFactory seems over engineered.
I suggest to remove the MicroKernelFactory and use standard constructor
calls as you proposed for now. Further down the line we should probably
rethink the issue of modularisation, dependency injection and
configuration within a broader scope anyway which might make this issue
obsolete. See also OAK-17.
Michael
Do you know of cases where we would need such a generic interface? The
only case I know of is the MultiMkTestBase class, which I think is
better handled with the new MicroKernelFixture mechanism in oak-it-mk.
BR,
Jukka Zitting