Author: pete.muir(a)jboss.org
Date: 2009-03-15 11:43:00 -0400 (Sun, 15 Mar 2009)
New Revision: 2001
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ServletInjector.java
ri/trunk/spi/
ri/trunk/spi/pom.xml
ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java
Log:
WBRI-184
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-03-15 01:47:28
UTC (rev 2000)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-03-15 15:43:00
UTC (rev 2001)
@@ -57,7 +57,6 @@
import javax.inject.manager.InterceptionType;
import javax.inject.manager.Interceptor;
import javax.inject.manager.Manager;
-import javax.servlet.Servlet;
import org.jboss.webbeans.bean.EnterpriseBean;
import org.jboss.webbeans.bean.NewEnterpriseBean;
@@ -616,9 +615,9 @@
return this.<T>getInstanceToInject(injectionPoint, null);
}
- public void injectServlet(Servlet servlet)
+ public void injectNonContextualInstance(Object instance)
{
- servletInjector.inject(servlet);
+ servletInjector.inject(instance);
}
@SuppressWarnings("unchecked")
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ServletInjector.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ServletInjector.java 2009-03-15
01:47:28 UTC (rev 2000)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ServletInjector.java 2009-03-15
15:43:00 UTC (rev 2001)
@@ -3,8 +3,6 @@
import java.util.Set;
import java.util.concurrent.Callable;
-import javax.servlet.Servlet;
-
import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
import org.jboss.webbeans.util.Beans;
@@ -13,18 +11,18 @@
public class ServletInjector
{
- private final ConcurrentCache<Class<?>,
Set<FieldInjectionPoint<?>>> servlets;
+ private final ConcurrentCache<Class<?>,
Set<FieldInjectionPoint<?>>> instances;
private final ManagerImpl manager;
public ServletInjector(ManagerImpl manager)
{
this.manager = manager;
- this.servlets = new ConcurrentCache<Class<?>,
Set<FieldInjectionPoint<?>>>();
+ this.instances = new ConcurrentCache<Class<?>,
Set<FieldInjectionPoint<?>>>();
}
- public void inject(final Servlet instance)
+ public void inject(final Object instance)
{
- Set<FieldInjectionPoint<?>> injectionPoints =
servlets.putIfAbsent(instance.getClass(), new
Callable<Set<FieldInjectionPoint<?>>>()
+ Set<FieldInjectionPoint<?>> injectionPoints =
instances.putIfAbsent(instance.getClass(), new
Callable<Set<FieldInjectionPoint<?>>>()
{
public Set<FieldInjectionPoint<?>> call() throws Exception
Property changes on: ri/trunk/spi
___________________________________________________________________
Name: svn:ignore
- .classpath
target
.project
.settings
+ .classpath
target
.project
.settings
test-output
temp-testng-customsuite.xml
Modified: ri/trunk/spi/pom.xml
===================================================================
--- ri/trunk/spi/pom.xml 2009-03-15 01:47:28 UTC (rev 2000)
+++ ri/trunk/spi/pom.xml 2009-03-15 15:43:00 UTC (rev 2001)
@@ -36,11 +36,6 @@
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</dependency>
Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java
===================================================================
---
ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java 2009-03-15
01:47:28 UTC (rev 2000)
+++
ri/trunk/spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java 2009-03-15
15:43:00 UTC (rev 2001)
@@ -18,7 +18,6 @@
package org.jboss.webbeans.manager.api;
import javax.inject.manager.Manager;
-import javax.servlet.Servlet;
/**
* Functionality provided by the Web Beans Manager over and above the JSR-299
@@ -31,11 +30,11 @@
{
/**
- * Perform JSR-299 dependency injection on a servlet
+ * Perform JSR-299 dependency injection into a non-contextual instance
*
- * @param servlet
- * the servlet instance to inject
+ * @param instance
+ * the instance to inject
*/
- public void injectServlet(Servlet servlet);
+ public void injectNonContextualInstance(Object instance);
}
Show replies by date