Tuesday, July 01, 2014

Google Guice: Why does it not appear that the @Singleton Annotation is not being respected by the Injector?

This took me a little while to figure out, apparently the Singletons you're injecting are per instance of the Injector. So if you are doing what I was, (creating an Injector in each class I was trying to inject a singleton into), that is incorrect.

Thank you, StackOverflow!

No comments: