Hi,
Been scratching my head about this, i am building a REST API using Jetty, Jersey and Guice.
I currently have a guice injector which has two modules, one for resources(RestModule) and the other a bunch of binders(ClientModule).
I have a resource called application service which has a list of running java applications(connecting via port and server).
In the application service i keep a map of running application in which i created an injector for each.
Allowing it to pass its own ClientModule however use the same RestModule.
How would i go about architecuring this sort of system, were you have an injector for each instance of a java application using the same rest resources.
Application - java1
api/java1/user/all
Application - java2
api/java2/user/all