It depends on which scope you specify for your component when it is actually 
instantiated. Yesterday we found out that if you don't specify a specific scope 
(like 'singleton') the component is instantiated every time it is used for 
injection, so not necessarily during Magnolia startup.

I think it would be best to leave component instantiation to Magnolia (and its 
underlying Guice dependency injection framework) if you can, but then again 
maybe I don't really understand what you're trying to accomplish.

Nils.
________________________________
Van: [email protected] <[email protected]> namens 
Erik Alphenaar <[email protected]>
Verzonden: dinsdag 5 november 2013 10:33
Aan: Magnolia User-List
Onderwerp: Re: [magnolia-user] Adding component instance to Guice runtime

Hi Nils,

Thanks for your reply. Components defined in the module descriptor are 
instantiated at a very early stage in the startup. I want to register a 
component later on in the chain, for example in the startup of a module.
Second, components in a module descriptor are instantiated by Magnolia. I 
already have an instance and like I mentioned, I want that specific instance to 
be registered as a component.

Rgds,
Erik.
[http://download.omroep.nl/vpro/vprologomail/provpro_signature.png]<http://www.vpro.nl/provpro>


disclaimer<http://www.vpro.nl/disclaimer>



----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to