Comment #5 on issue 237 by arnihr: Servlet context scope
http://code.google.com/p/google-guice/issues/detail?id=237

Well, you can't inject javax.servlet.ServletContext into a singleton (if I  
remember
correctly). You'd have to use a Provider, which isn't bad, it just isn't  
obvious for
the most basic users. Perhaps documenting the case, and letting users know  
that they
mustn't attempt to access the ServletContext instance unless the code is  
actually run
inside a request.

With my patch you could've accessed the ServletContext instance as soon as  
the
application was initialized, since the class it was injected to would've  
been bound
to the scope of the web application.

Hope my intentions are clear.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to