How to implement guice injections with mutliple Java Programs?

32 views
Skip to first unread message

Yeah Yeah

unread,
Feb 10, 2016, 8:34:29 PM2/10/16
to google-guice
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

Stephan Classen

unread,
Feb 11, 2016, 12:35:33 AM2/11/16
to google...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages