[jboss-cvs] JBossAS SVN: r58765 - trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Nov 29 21:40:13 EST 2006


Author: remy.maucherat at jboss.com
Date: 2006-11-29 21:40:11 -0500 (Wed, 29 Nov 2006)
New Revision: 58765

Modified:
   trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/JBossContextConfig.java
   trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment2.java
   trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/VFSDirContext.java
Log:
- Fix usage of VFS.
- A few small fixes.

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/JBossContextConfig.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/JBossContextConfig.java	2006-11-30 01:00:37 UTC (rev 58764)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/JBossContextConfig.java	2006-11-30 02:40:11 UTC (rev 58765)
@@ -48,9 +48,6 @@
     @Override
 	protected void applicationWebConfig() {
     	
-    	// FIXME: also do parsing in Tomcat, as JBoss web.xml parsing is missing certain things
-    	//super.applicationWebConfig();
-    	
     	WebMetaData metaData = metaDataLocal.get();
     	
     	// FIXME: metadata-complete attribute
@@ -92,6 +89,7 @@
     		filterDef.setFilterName(value.getName());
     		filterDef.setFilterClass(value.getFilterClass());
     		Iterator params = value.getInitParams().iterator();
+            // FIXME: init-params list is always empty
     		while (params.hasNext()) {
     			NameValuePair nvp = (NameValuePair) params.next();
     			filterDef.addInitParameter(nvp.getName(), nvp.getValue());

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment2.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment2.java	2006-11-30 01:00:37 UTC (rev 58764)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment2.java	2006-11-30 02:40:11 UTC (rev 58765)
@@ -194,6 +194,11 @@
       {
          context.setAnnotationProcessor(injectionContainer);
       }
+      
+      VFSDirContext resources = new VFSDirContext();
+      resources.setVirtualFile(webApp.getDeploymentUnit().getFile(""));
+      context.setResources(resources);
+      
       context.setDocBase(url.getFile());
       context.setConfigFile(ctxConfig);
       context.setDefaultContextXml("context.xml");
@@ -280,16 +285,25 @@
       context.addValve(jaccValve);
 
       // Set listener
-      // FIXME: New binaries needed 
-      // context.setConfigClass("org.jboss.web.tomcat.tc6.deployers.JBossContextConfig");
+      //context.setConfigClass("org.jboss.web.tomcat.tc6.deployers.JBossContextConfig");
       
       // Pass the metadata to the RunAsListener via a thread local
       RunAsListener.metaDataLocal.set(metaData);
       JBossContextConfig.metaDataLocal.set(metaData);
       try
       {
-         // Init the container; this will also start it
-    	 context.init();
+          // Init the container; this will also start it
+          context.init();
+
+          // make the context class loader known to the WebMetaData, ws4ee needs it
+          // to instanciate service endpoint pojos that live in this webapp
+          Loader ctxLoader = context.getLoader();
+          metaData.setContextLoader(ctxLoader.getClassLoader());
+
+          // Start it
+          context.start();
+          // Build the ENC
+
       }
       finally
       {
@@ -297,15 +311,6 @@
          JBossContextConfig.metaDataLocal.set(null);
       }
 
-      // make the context class loader known to the WebMetaData, ws4ee needs it
-      // to instanciate service endpoint pojos that live in this webapp
-      Loader ctxLoader = context.getLoader();
-      metaData.setContextLoader(ctxLoader.getClassLoader());
-
-      // Start it
-      context.start();
-      // Build the ENC
-
       if (injectionContainer == null)
          super.processEnc(webLoader.getClassLoader(), webApp);
       else

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/VFSDirContext.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/VFSDirContext.java	2006-11-30 01:00:37 UTC (rev 58764)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/VFSDirContext.java	2006-11-30 02:40:11 UTC (rev 58765)
@@ -750,6 +750,8 @@
      */
     protected VirtualFile treeLookup(Name name)
         throws IOException {
+        if (base == null)
+            return null;
         if (name.isEmpty())
             return base;
         VirtualFile currentFile = base;




More information about the jboss-cvs-commits mailing list