You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by do...@apache.org on 2008/06/14 00:16:53 UTC
svn commit: r667671 -
/incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/InjectedServlet.java
Author: doll
Date: Fri Jun 13 15:16:53 2008
New Revision: 667671
URL: http://svn.apache.org/viewvc?rev=667671&view=rev
Log:
Pulled the InjectedServlet injector out into a protected field so that subclasses can use it.
Modified:
incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/InjectedServlet.java
Modified: incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/InjectedServlet.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/InjectedServlet.java?rev=667671&r1=667670&r2=667671&view=diff
==============================================================================
--- incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/InjectedServlet.java (original)
+++ incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/servlet/InjectedServlet.java Fri Jun 13 15:16:53 2008
@@ -31,11 +31,12 @@
* the servlet spec requires configuration being done in init().
*/
public abstract class InjectedServlet extends HttpServlet {
+ protected Injector injector;
- @Override public void init(ServletConfig config) throws ServletException {
+ @Override public void init(ServletConfig config) throws ServletException {
super.init(config);
ServletContext context = config.getServletContext();
- Injector injector = (Injector)
+ injector = (Injector)
context.getAttribute(GuiceServletContextListener.INJECTOR_ATTRIBUTE);
if (injector == null) {
throw new UnavailableException(