Its been working well for me for a while now. I just had to duplicate the
GuiceDeploymentConfiguration bits to allow my own module to be injected also.
This could be easier if GuiceDeploymentConfiguration was more like:
<snip>
public GuiceDeploymentConfiguration() {
LifecycleManagersRegistry lifecycleManagersRegistry = new
LifecycleManagersRegistry();
setOfFactoryRegistry(lifecycleManagersRegistry);
Injector injector = Guice.createInjector(createModules());
lifecycleManagersRegistry.addFactoryFactory(new
GuiceInjectorLifeCycleManager(injector));
}
public Module[] createModules() {
return new Module[] {
new WinkGuiceModule()
};
}
</snip>
Then users could just sub-class GuiceDeploymentConfiguration and configure it
to be used in web.xml. Something along those lines.
Have you folks looked at the GuiceFilter stuff and/or using the WebModule bits
to configure the web-app there (instead of using xml)?
--jason
On Mar 29, 2010, at 6:54 AM, Bryant Luk wrote:
> This code was experimental (but glad you like it) and I think there
> needs to be some work done to fully enable the feature (i.e. make the
> injector configuration easier). I'll go ahead and add the module
> though since there shouldn't be any harm.
>
> On Sat, Mar 27, 2010 at 2:36 PM, Jason Dillon <[email protected]> wrote:
>> ... why not?
>>
>> --jason
>>