Index: tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java
===================================================================
--- tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java	(revision 104614)
+++ tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java	(revision )
@@ -21,31 +21,7 @@
  */
 package org.jboss.web.tomcat.service.deployers;
 
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLDecoder;
-import java.security.CodeSource;
-import java.security.cert.Certificate;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.LinkRef;
-
-import org.apache.catalina.Container;
-import org.apache.catalina.Engine;
-import org.apache.catalina.LifecycleEvent;
-import org.apache.catalina.LifecycleListener;
-import org.apache.catalina.Loader;
+import org.apache.catalina.*;
 import org.apache.catalina.core.StandardContext;
 import org.apache.tomcat.util.modeler.Registry;
 import org.jboss.dependency.spi.ControllerContext;
@@ -58,12 +34,14 @@
 import org.jboss.metadata.web.spec.TldMetaData;
 import org.jboss.mx.util.MBeanServerLocator;
 import org.jboss.naming.NonSerializableFactory;
+import org.jboss.reloaded.naming.deployers.javaee.JavaEEComponentInformer;
+import org.jboss.reloaded.naming.spi.JavaEEComponent;
+import org.jboss.reloaded.naming.spi.JavaEEModule;
 import org.jboss.security.SecurityUtil;
 import org.jboss.vfs.VFS;
 import org.jboss.vfs.VirtualFile;
 import org.jboss.web.WebApplication;
 import org.jboss.web.deployers.AbstractWarDeployment;
-import org.jboss.web.deployers.SharedJBossWebMetaDataDeployer;
 import org.jboss.web.deployers.SharedTldMetaDataDeployer;
 import org.jboss.web.tomcat.security.JaccContextValve;
 import org.jboss.web.tomcat.security.RunAsListener;
@@ -72,9 +50,20 @@
 import org.jboss.web.tomcat.service.NamingListener;
 import org.jboss.web.tomcat.service.TomcatInjectionContainer;
 import org.jboss.web.tomcat.service.WebCtxLoader;
-import org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve;
 import org.omg.CORBA.ORB;
 
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.LinkRef;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLDecoder;
+import java.security.CodeSource;
+import java.security.cert.Certificate;
+import java.util.*;
+
 /**
  * A tomcat web application deployment.
  * 
@@ -298,8 +287,8 @@
       JBossContextConfig.metaDataLocal.set(metaData);
       JBossContextConfig.deployerConfig.set(config);
       JBossContextConfig.tldMetaDataMapLocal.set(tldMetaDataMap);
-      // TODO: acquire the component ID
-      NamingListener.idLocal.set(null);
+      JavaEEComponent component = createJavaEEComponent();
+      NamingListener.idLocal.set(component);
 
       JBossContextConfig.kernelLocal.set(kernel);
       JBossContextConfig.deploymentUnitLocal.set(unit);
@@ -655,4 +644,42 @@
       return (Engine) parentContainer;
    }
 
+   private JavaEEComponent createJavaEEComponent()
+   {
+      // TODO: must come in via MC injection
+//      NamingJavaEEComponentInformer componentInformer = new NamingJavaEEComponentInformer();
+//      componentInformer.setJavaEEModuleIdentifier(new SimpleJavaEEModuleIdentifier());
+      final JavaEEComponentInformer componentInformer = (JavaEEComponentInformer) kernel.getController().getContextByClass(JavaEEComponentInformer.class).getTarget();
+      assert componentInformer != null : "componentInformer is null";
+      // assert ControllerState.INSTALLED
+
+      final String applicationName = componentInformer.getApplicationName(unit);
+      final String moduleName = componentInformer.getModulePath(unit);
+
+      // TODO: remove hard coded "jboss.naming" constant
+      final String beanName = "jboss.naming:" + (applicationName != null ? "application=" + applicationName + "," : "") + "module=" + moduleName;
+
+      // TODO: must come in via MC injection
+      final JavaEEModule module = (JavaEEModule) kernel.getController().getInstalledContext(beanName).getTarget();
+      assert module != null : "module is null";
+
+      // Web uses a Module context
+      return new JavaEEComponent() {
+
+         public Context getContext()
+         {
+            return module.getContext();
-}
\ No newline at end of file
+         }
+
+         public JavaEEModule getModule()
+         {
+            return module;
+         }
+
+         public String getName()
+         {
+            return module.getName();
+         }
+      };
+   }
+}
\ No newline at end of file
Index: testsuite/build.xml
===================================================================
--- testsuite/build.xml	(revision 104649)
+++ testsuite/build.xml	(revision )
@@ -1183,11 +1183,6 @@
       <include name="org/jboss/test/aop/test/Scoped*TestCase.class"/>
    </patternset>
    
-   <patternset id="naming-servlet.excludes">
-      <!-- Testing functionality that does not currently exist - See: JBAS-7908 -->
-      <exclude name="org/jboss/test/web/test/NamingServletUnitTestCase.class"/>
-   </patternset>
-
    <!-- The union of the excludes -->
    <patternset id="all.excludes">
       <patternset refid="aop-with-classloader.excludes"/>
@@ -1211,7 +1206,6 @@
       <patternset refid="jbossmessaging.excludes"/>
       <patternset refid="springdeployer.excludes"/>
       <patternset refid="jbas7273.excludes"/>
-      <patternset refid="naming-servlet.excludes"/>
    </patternset>
 
    <!-- A target that allows for conditional dependency on the compilation and
Index: tomcat/src/main/java/org/jboss/web/tomcat/service/NamingListener.java
===================================================================
--- tomcat/src/main/java/org/jboss/web/tomcat/service/NamingListener.java	(revision 104614)
+++ tomcat/src/main/java/org/jboss/web/tomcat/service/NamingListener.java	(revision )
@@ -24,6 +24,8 @@
 import org.apache.catalina.InstanceEvent;
 import org.apache.catalina.InstanceListener;
 import org.jboss.logging.Logger;
+import org.jboss.reloaded.naming.CurrentComponent;
+import org.jboss.reloaded.naming.spi.JavaEEComponent;
 
 /**
  * An InstanceListener used to push/pop the application naming context.
@@ -34,13 +36,14 @@
 public class NamingListener implements InstanceListener
 {
    private static Logger log = Logger.getLogger(NamingListener.class);
-   public static ThreadLocal<Object> idLocal = new ThreadLocal<Object>();
+   public static ThreadLocal<JavaEEComponent> idLocal = new ThreadLocal<JavaEEComponent>();
 
-   private Object id;
+   private JavaEEComponent id;
 
    public NamingListener()
    {
       id = idLocal.get();
+      assert id != null : "id is null";
    }
 
    public Object getId()
@@ -48,7 +51,7 @@
       return id;
    }
 
-   public void setId(Object id)
+   public void setId(JavaEEComponent id)
    {
       this.id = id;
    }
@@ -61,14 +64,14 @@
          || type.equals(InstanceEvent.BEFORE_DISPATCH_EVENT) )
       {
          // Push naming id
-         //TODO
+         CurrentComponent.push(id);
       }
       // Pop the identity on the after init/destroy
       else if ( type.equals(InstanceEvent.AFTER_REQUEST_EVENT)
          || type.equals(InstanceEvent.AFTER_DISPATCH_EVENT) )
       {
          // Pop naming id
-         //TODO
+         CurrentComponent.pop();
       }
    }
    
