[jboss-cvs] JBossAS SVN: r97039 - in trunk/server/src/main/java/org/jboss: web/deployers and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Nov 26 11:26:16 EST 2009


Author: remy.maucherat at jboss.com
Date: 2009-11-26 11:26:16 -0500 (Thu, 26 Nov 2009)
New Revision: 97039

Modified:
   trunk/server/src/main/java/org/jboss/deployment/AnnotationMetaDataDeployer.java
   trunk/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java
Log:
- SCI compilation ooops.
- Fix annotations being skipped in WARs. I have the impression all annotations will need to move to per JAR processing when in WARs,
  but this will be enough for now.

Modified: trunk/server/src/main/java/org/jboss/deployment/AnnotationMetaDataDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/AnnotationMetaDataDeployer.java	2009-11-26 16:17:35 UTC (rev 97038)
+++ trunk/server/src/main/java/org/jboss/deployment/AnnotationMetaDataDeployer.java	2009-11-26 16:26:16 UTC (rev 97039)
@@ -91,11 +91,6 @@
       if (unit instanceof VFSDeploymentUnit == false)
          return;
 
-      if (unit.getSimpleName().endsWith(".war"))
-      {
-         return;
-      }
-
       VFSDeploymentUnit vfsDeploymentUnit = (VFSDeploymentUnit) unit;
       deploy(vfsDeploymentUnit);
    }
@@ -216,9 +211,10 @@
       if (classes.size() > 0)
       {
          AnnotationFinder<AnnotatedElement> finder = new DefaultAnnotationFinder<AnnotatedElement>();
-         if (webMetaData != null)
+         /* Note: Web related annotations scanning is done by WarAnnotationMetaDataDeployer at the moment
+          * if (webMetaData != null)
             processJBossWebMetaData(unit, finder, classesPerJar);
-         else if (clientMetaData != null || mainClassName != null)
+         else */if (clientMetaData != null || mainClassName != null)
             processJBossClientMetaData(unit, finder, classes);
          else
             processJBossMetaData(unit, finder, classes);

Modified: trunk/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java	2009-11-26 16:17:35 UTC (rev 97038)
+++ trunk/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java	2009-11-26 16:26:16 UTC (rev 97039)
@@ -104,16 +104,23 @@
       {
          for (URL jarURL : sciJars)
          {
-            VFS vfs = VFS.getVFS(jarURL);
-            VirtualFile sci = vfs.getChild("META-INF/services/javax.servlet.ServletContainerInitializer");
-            if (sci != null)
+            try
             {
-               ServletContainerInitializer service = loadSci(unit, sci, jarURL.getPath(), false);
-               if (service != null)
+               VFS vfs = VFS.getVFS(jarURL);
+               VirtualFile sci = vfs.getChild("META-INF/services/javax.servlet.ServletContainerInitializer");
+               if (sci != null)
                {
-                  scis.add(service);
+                  ServletContainerInitializer service = loadSci(unit, sci, jarURL.getPath(), false);
+                  if (service != null)
+                  {
+                     scis.add(service);
+                  }
                }
             }
+            catch (IOException e)
+            {
+               DeploymentException.rethrowAsDeploymentException("Deployment error processing SCI for JAR: " + jarURL, e);
+            }
          }
       }
       // Find local ServletContainerInitializer services




More information about the jboss-cvs-commits mailing list