Hello, New to Guice - coming from Spring.. I am working on developing a lightweight java layer based on google- guice and EventBus to give me some very lightweight decoupled modules. This 'layer' will be used by a Swing and eventually JavaFX UI.
I am wondering what is 'best practice' or what is typcially done when dealing with the Injector... In Spring I can get the application context at any point through a singleton - it doesnt keep bootstrapping.. In Guice I do the following: Injector injector = Guice.createInjector(new TestModule()); This seems like something I need to do once... Therefore is it a case of doing this on app startup and maintaining a reference to the Injector myself ? There is tonnes of examples of setting up DI in Guice but I guess I'm looking at what best practices are for the external code Thanks -A- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" 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?hl=en -~----------~----~----~----~------~----~------~--~---
