Author: dhanji
Date: Thu Mar 26 17:39:55 2009
New Revision: 911
Modified:
trunk/servlet/src/com/google/inject/servlet/GuiceServletContextListener.java
Log:
Make ServletContext available even a bit earlier than it already was.
Modified:
trunk/servlet/src/com/google/inject/servlet/GuiceServletContextListener.java
==============================================================================
---
trunk/servlet/src/com/google/inject/servlet/GuiceServletContextListener.java
(original)
+++
trunk/servlet/src/com/google/inject/servlet/GuiceServletContextListener.java
Thu Mar 26 17:39:55 2009
@@ -37,10 +37,10 @@
public void contextInitialized(ServletContextEvent servletContextEvent) {
ServletContext servletContext =
servletContextEvent.getServletContext();
- servletContext.setAttribute(INJECTOR_NAME, getInjector());
// Set the Servletcontext early for those people who are using this
class.
GuiceFilter.servletContext = new
WeakReference<ServletContext>(servletContext);
+ servletContext.setAttribute(INJECTOR_NAME, getInjector());
}
public void contextDestroyed(ServletContextEvent servletContextEvent) {
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en
-~----------~----~----~----~------~----~------~--~---