[jboss-cvs] JBossAS SVN: r112245 - branches/JBPAPP_5_1_0_Final_JBPAPP-7180/ejb3/src/main/org/jboss/as/javaee.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Sep 15 15:10:10 EDT 2011


Author: aogburn
Date: 2011-09-15 15:10:09 -0400 (Thu, 15 Sep 2011)
New Revision: 112245

Modified:
   branches/JBPAPP_5_1_0_Final_JBPAPP-7180/ejb3/src/main/org/jboss/as/javaee/SimpleJavaEEModuleInformer.java
Log:
[JBPAPP-7180] merging fix to SimpleJavaEEModuleInformer

Modified: branches/JBPAPP_5_1_0_Final_JBPAPP-7180/ejb3/src/main/org/jboss/as/javaee/SimpleJavaEEModuleInformer.java
===================================================================
--- branches/JBPAPP_5_1_0_Final_JBPAPP-7180/ejb3/src/main/org/jboss/as/javaee/SimpleJavaEEModuleInformer.java	2011-09-15 16:04:43 UTC (rev 112244)
+++ branches/JBPAPP_5_1_0_Final_JBPAPP-7180/ejb3/src/main/org/jboss/as/javaee/SimpleJavaEEModuleInformer.java	2011-09-15 19:10:09 UTC (rev 112245)
@@ -44,10 +44,20 @@
       return null;
    }
 
-   public String getModulePath(DeploymentUnit unit)
-   {
-      return unit.getRelativePath();
-   }
+	public String getModulePath(DeploymentUnit unit)
+	{
+		// first check if this a JavaEE Application (i.e. if it's a .ear).
+		// If yes, then return the relative path (i.e. module name) of the unit
+		// relative to the .ear
+		DeploymentUnit topLevel = unit.getTopLevel();
+		if (topLevel.isAttachmentPresent(JBossAppMetaData.class))
+		{
+			return unit.getRelativePath();
+		}
+		// if it's not a JavaEE application (i.e. not a .ear), then
+		// return the simple name of the unit.
+		return unit.getSimpleName();
+	}
 
    public ModuleType getModuleType(DeploymentUnit unit)
    {


Property changes on: branches/JBPAPP_5_1_0_Final_JBPAPP-7180/ejb3/src/main/org/jboss/as/javaee/SimpleJavaEEModuleInformer.java
___________________________________________________________________
Added: svn:mergeinfo
   + /branches/JBPAPP_5_1/ejb3/src/main/org/jboss/as/javaee/SimpleJavaEEModuleInformer.java:112207



More information about the jboss-cvs-commits mailing list