[jboss-cvs] JBossAS SVN: r108013 - trunk/ejb3/src/main/java/org/jboss/as/javaee.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Sep 7 11:58:59 EDT 2010
Author: jaikiran
Date: 2010-09-07 11:58:59 -0400 (Tue, 07 Sep 2010)
New Revision: 108013
Modified:
trunk/ejb3/src/main/java/org/jboss/as/javaee/SimpleJavaEEModuleInformer.java
Log:
JBAS-8392 Return the correct module name for top-level non-ear deployments
Modified: trunk/ejb3/src/main/java/org/jboss/as/javaee/SimpleJavaEEModuleInformer.java
===================================================================
--- trunk/ejb3/src/main/java/org/jboss/as/javaee/SimpleJavaEEModuleInformer.java 2010-09-07 15:56:01 UTC (rev 108012)
+++ trunk/ejb3/src/main/java/org/jboss/as/javaee/SimpleJavaEEModuleInformer.java 2010-09-07 15:58:59 UTC (rev 108013)
@@ -44,7 +44,17 @@
public String getModulePath(DeploymentUnit unit)
{
- return unit.getRelativePath();
+ // 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)
More information about the jboss-cvs-commits
mailing list