[weld-commits] Weld SVN: r4580 - core/trunk/porting-package/src/main/java/org/jboss/weld/tck.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Mon Nov 2 19:08:13 EST 2009


Author: pete.muir at jboss.org
Date: 2009-11-02 19:08:12 -0500 (Mon, 02 Nov 2009)
New Revision: 4580

Modified:
   core/trunk/porting-package/src/main/java/org/jboss/weld/tck/ManagersImpl.java
Log:
Use BeanManagerLocator

Modified: core/trunk/porting-package/src/main/java/org/jboss/weld/tck/ManagersImpl.java
===================================================================
--- core/trunk/porting-package/src/main/java/org/jboss/weld/tck/ManagersImpl.java	2009-11-03 00:07:43 UTC (rev 4579)
+++ core/trunk/porting-package/src/main/java/org/jboss/weld/tck/ManagersImpl.java	2009-11-03 00:08:12 UTC (rev 4580)
@@ -2,30 +2,18 @@
 
 import javax.enterprise.inject.UnproxyableResolutionException;
 import javax.enterprise.inject.spi.BeanManager;
-import javax.servlet.ServletContext;
 
 import org.jboss.jsr299.tck.spi.Managers;
-import org.jboss.testharness.impl.runner.servlet.ServletTestRunner;
 import org.jboss.weld.DefinitionException;
 import org.jboss.weld.DeploymentException;
-import org.jboss.weld.mock.MockServletContext;
-import org.jboss.weld.servlet.ServletHelper;
+import org.jboss.weld.test.BeanManagerLocator;
 
 public class ManagersImpl implements Managers
 {
    
-   private static final ServletContext SERVLET_CONTEXT = new MockServletContext("");
-
    public BeanManager getManager()
    {
-      if (ServletTestRunner.getCurrentServletContext() != null)
-      {
-         return ServletHelper.getModuleBeanManager(ServletTestRunner.getCurrentServletContext());
-      }
-      else
-      {
-         return ServletHelper.getModuleBeanManager(SERVLET_CONTEXT);
-      }
+      return BeanManagerLocator.INSTANCE.locate();
    }
 
    public boolean isDefinitionError(org.jboss.testharness.api.DeploymentException deploymentException)



More information about the weld-commits mailing list