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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 27 14:06:13 EDT 2006


Author: scott.stark at jboss.org
Date: 2006-10-27 14:06:11 -0400 (Fri, 27 Oct 2006)
New Revision: 57902

Modified:
   trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java
Log:
More hacking of the shortName/baseName.

Modified: trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java	2006-10-27 16:47:12 UTC (rev 57901)
+++ trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java	2006-10-27 18:06:11 UTC (rev 57902)
@@ -46,15 +46,23 @@
    {
       // Use the root vfs path name
       this.shortName = parent.getRoot().getPathName();
-      // this is a hack because VFS has gay URL name.
-      if (shortName.endsWith("!/"))
+      if( shortName.length() == 0 )
       {
-         this.shortName = shortName.substring(0, shortName.length() - 2);
-         int x = shortName.lastIndexOf('/');
-         this.shortName = shortName.substring(x + 1);
+         shortName = parent.getName();
+         // this is a hack because VFS has gay URL name.
+         if (shortName.endsWith("!/"))
+         {
+            this.shortName = shortName.substring(0, shortName.length() - 2);
+         }
       }
+      // Further reduce the path to the last component of the url name 
+      int x = shortName.lastIndexOf('/');
+      this.shortName = shortName.substring(x + 1);
+
+      baseName = shortName;
       int idx = shortName.lastIndexOf('.');
-      baseName = shortName.substring(0, idx);
+      if( idx > 0 )
+         baseName = shortName.substring(0, idx);
       deployments = (ConcurrentHashMap<String, Ejb3Deployment>)parent.getDeploymentUnit().getAttachment("EJB_DEPLOYMENTS");
       if (deployments == null)
       {




More information about the jboss-cvs-commits mailing list