Heya, I really love Guice, it has made me a much better coder. It forces you to think about design. Something I've not yet found a good solution for is when I have to reset singletons. I'm not sure that is the way I want to solve the issue though.
I have a bunch of singletons that should be singletons until the user chose to reload parts of the application. Then I have to reset a few objects to get a clean state. Some of the thoughts I have: Maybe all the classes that should be resettable should rather have a reset method? Injecting factories that can give you new instances? I'm using the second solution right now. The problem is when two classes depends the same "resettable singleton", as I can't inject the object directly from Guice as a Singleton. Should I build my own app level "resettable singleton" functionality or is there is there a Guice way? Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
