resteasy/Resteasy — pull request #310 by mwanji (2013-05-31 19:08:11+00:00)
Title: Guice module can be configured via Injector

Let me know if there are things you want me to change. If not, I'll add JavaDoc and update the documentation.

I added a GuiceInjectorResteasyBootstrapServletContextListener that allows the user to create their own Injector, rather than simply pass in a list of Module class names.

The user extends the new class, implements the abstract getInjector() method and registers their listener instead of GuiceResteasyBootstrapServletContextListener, much like Guice-Servlet's ServletContextListener. This allows for more sophisticated Guice configuration.

My usecase was using Guice-Persist, in which the JpaPersistModule's constructor takes a String. I considered simply adding a dedicated configuration option, but that would not allow for multiple persistence units.