Mark Hobson
2009-06-11 14:20:29 UTC
Hi there,
Is there a more explicit way of registering a component instance to a
container that I'm missing, other than the usual
MutablePicoContainer.addComponent method? A problem arises when you
actually want to register a Class instance and DefaultPicoContainer
treats it as an implementation. I can't see a way of achieving this
with properties.
Perhaps addConfig could be generalised further into addInstance for
these purposes? Of course, using addAdapter with an InstanceAdapter
works but you lose the lifecycle strategy and component monitor.
Cheers,
Mark
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Is there a more explicit way of registering a component instance to a
container that I'm missing, other than the usual
MutablePicoContainer.addComponent method? A problem arises when you
actually want to register a Class instance and DefaultPicoContainer
treats it as an implementation. I can't see a way of achieving this
with properties.
Perhaps addConfig could be generalised further into addInstance for
these purposes? Of course, using addAdapter with an InstanceAdapter
works but you lose the lifecycle strategy and component monitor.
Cheers,
Mark
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email