geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Jiang <genspr...@gmail.com>
Subject Can anyone tell me what's the reason to remove the .jar extension in GERONIMO-5253 ?
Date Mon, 07 Mar 2011 02:46:38 GMT
In the changes of JIRA[1] made by Jarek, there are many code[2] added in all
module builders to remove the .jar extension from module name.  I could also
find similar change[1] in openejb code.    For EJB module,  because openejb
will need the .jar style module name to resolve the EJB link(xxx.jar#xxx),
 the change broke the ejb link cases.

I want to revert the .jar removal code from  EjbModuleBuilder to fix this,
but I don't want to broke other things because of the revert. Can anyone
tell me what's the reason to remove the .jar extension ?


[1]https://issues.apache.org/jira/browse/GERONIMO-5253: Publish application
name to JNDI (java:app/AppName)

[2] .jar removal code changes  in module builders.


+        String name = null;
+        if (appClient.isSetModuleName()) {
+            name = appClient.getModuleName().getStringValue().trim();
+        } else if (standAlone) {
+            name = FileUtils.removeExtension(new
File(moduleFile.getName()).getName(), ".jar");
+        } else {
+            name = FileUtils.removeExtension(targetPath, ".jar");
+        }


[3]  Similar .jar removal code in openejb.

Modified:
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/EjbModule.java
    URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/EjbModule.java?rev=979165&r1=979164&r2=979165&view=diff

 ==============================================================================
    ---
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/EjbModule.java
(original)
    +++
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/EjbModule.java
Mon Jul 26 06:11:39 2010
    @@ -86,6 +86,8 @@ public class EjbModule implements WsModu
                   moduleId = file.getName();
                   if (moduleId == null){
                       moduleId = jarURI;
    +                } else if (moduleId.endsWith(".jar")) {
    +                    moduleId = moduleId.substring(0, moduleId.length()
- ".jar".length() );
                   }
               }
           }


-- 
Shawn

Mime
View raw message