I have one application that contains sub-applications. I would like to segregate the GIN injection so that each sub-application can have separate instances of the same core shared classes. I also want the injector to supply classes from some core modules to all sub-applications, so that singleton instances can be shared. e.g.
GIN Modules:
Core - shared
MetadataCache - one per sub-application
UserProvider - one per sub-application
In Guice I can do this using createChildInjector
, but I can't see an obvious equivalent in GIN.
Can I achieve something similar in GIN?
Here it is on SOF http://code.google.com/p/google-gin/wiki/PrivateModulesDesignDoc. Hope it helps you out.