Configuration: Guice 1.0, Apache Tomcat 6.0
I am currently manually injecting objects configured in a Guice Module, into my servlet, using this method:
public void init( ServletConfig config ) throws ServletException
{
super.init( config );
ServletContext sc = config.getServletContext();
Injector injector = (Injector) sc
.getAttribute( Constants.Guice.INJECTOR_APP_CONTEXT_KEY );
injector.injectMembers( this );
}
How can I do the same into a HttpSessionAttributeListener (since it doesn't have any lifecycle methods) ?
Thanks
J