[jboss-cvs] JBossAS SVN: r99417 - trunk/server/src/main/java/org/jboss/as/naming/javaee.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jan 14 13:17:39 EST 2010


Author: wolfc
Date: 2010-01-14 13:17:39 -0500 (Thu, 14 Jan 2010)
New Revision: 99417

Modified:
   trunk/server/src/main/java/org/jboss/as/naming/javaee/NamingJavaEEModuleInformer.java
Log:
JBAS-7556: hack to make module names unique

Modified: trunk/server/src/main/java/org/jboss/as/naming/javaee/NamingJavaEEModuleInformer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/as/naming/javaee/NamingJavaEEModuleInformer.java	2010-01-14 17:34:24 UTC (rev 99416)
+++ trunk/server/src/main/java/org/jboss/as/naming/javaee/NamingJavaEEModuleInformer.java	2010-01-14 18:17:39 UTC (rev 99417)
@@ -19,10 +19,18 @@
 
    public String getModulePath(DeploymentUnit deploymentUnit)
    {
+      /*
+       * JavaEE 6 FR 8.1.1:
+       * The name can be explicitly set in the deployment descriptor for the module. If not set, the name
+       * of the module is the pathname of the module in the ear file with any filename extension (.jar, .war, .rar)
+       * removed, but with any directory names included.
+       */
+      // TODO: get the module name from the deployment descriptor
+      // FIXME: AS can't handle unique module names yet because we deploy a.jar and a.war at the same time, to counter don't strip the extension.
       String path = deploymentUnit.getRelativePath();
       if(path == null || path.length() == 0)
          path = deploymentUnit.getSimpleName();
-      return path.substring(0, path.length() - 4);
+      return path;
    }
 
    public ModuleType getModuleType(DeploymentUnit deploymentUnit)




More information about the jboss-cvs-commits mailing list