Comment #65 on issue 62 by mcculls: Lifecycle support
http://code.google.com/p/google-guice/issues/detail?id=62

@61 FWIW you can use @PostConstruct with Guice if you add the http://code.google.com/p/guiceyfruit/ extension. This uses the same SPI that I used to re-implement Plexus as an extension on top of Guice.

On a side-note, to support Plexus lifecycles I took the simple approach and used an InjectionListener to track instances that implemented the various Plexus lifecycle interfaces - for each instance I ran through the appropriate startup sequence. This worked because for all cases (so far) the startup sequence matched the injection sequence. When the container stopped I just did the calls in reverse.

So basic lifecycle support is already possible using the SPI in trunk - I also think it's better for this to be an extension rather than baked into core, as there will always be someone who wants a different model.

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice-dev?hl=en.

Reply via email to