Hi Everyone. I'm attempting to use Guice with Restlet to inject session beans from EJB3 so that unit and module testing will be easier down the road. I found this helpful site with some code examples for getting started on this:
http://tembrel.blogspot.com/2008/07/resource-dependency-injection-in.html However, now I'm at the part where I want to attach multiple routers to different paths of my app. So my application looks something like: FinderFactory factory = RestletGuice.createInjector(new DelegateModule()).getInstance(FinderFactory.class); Finder finder = factory.finderFor(Key.get(Handler.class, InjectableResource.class)); router.attach("/policies", InsuredPolicyResource.class); router.attach("/policies/{id}", InsuredPolicyResource.class); router.attach("/vehicles", VehicleResource.class); router.attach("/vehicles/{id}", VehicleResource.class); router.attach("/garages", GarageResource.class); router.attach("/garages/{id}", GarageResource.class); return router; I'm not sure how I can create multiple finders that lookup the right resource to attach to the router. The "InjectableResource" above is just a tag annotation, but the example on the web page has one annotation for the one resource. If anyone has any suggestions or examples for specifying which Resource to grab from the finder, I'd really appreciate it. Thanks, Brian -- Brian E. Williams Senior Application Developer The Archer Group 233 King Street Wilmington, DE 19801 w: 302.429.9120 x225 f: 302.429.8720 http://www.archer-group.com ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=987592

