[jboss-cvs] JBossAS SVN: r74360 - trunk/ejb3/src/main/org/jboss/ejb3/deployers.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jun 10 17:18:42 EDT 2008


Author: scott.stark at jboss.org
Date: 2008-06-10 17:18:41 -0400 (Tue, 10 Jun 2008)
New Revision: 74360

Modified:
   trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3Deployer.java
Log:
Correct the scoped unit determination

Modified: trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3Deployer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3Deployer.java	2008-06-10 20:28:11 UTC (rev 74359)
+++ trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3Deployer.java	2008-06-10 21:18:41 UTC (rev 74360)
@@ -40,6 +40,7 @@
 import org.jboss.ejb3.proxy.factory.RemoteProxyFactoryRegistry;
 import org.jboss.kernel.Kernel;
 import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.metadata.ear.jboss.JBossAppMetaData;
 import org.jboss.metadata.ejb.jboss.JBossMetaData;
 import org.jboss.metadata.jpa.spec.PersistenceMetaData;
 import org.jboss.metadata.web.jboss.JBossWebMetaData;
@@ -146,8 +147,8 @@
             scope = (JBoss5DeploymentScope) parent.getAttachment(DeploymentScope.class);
             if (scope == null)
             {
-               // FIXME: make a proper determination if this unit is an ear
-               boolean isEar = unit.getSimpleName().endsWith(".ear");
+               // Check for a scoped deployment or an ear top-level unit
+               boolean isEar = unit != unit.getTopLevel() || parent.isAttachmentPresent(JBossAppMetaData.class);
                if(parent.isAttachmentPresent(DeploymentEndpointResolver.class) == true)
                   scope = new JBoss5DeploymentScope(parent, isEar);
                else




More information about the jboss-cvs-commits mailing list