tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1198116 - /openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java
Date Sun, 06 Nov 2011 00:45:08 GMT
Author: dblevins
Date: Sun Nov  6 00:45:08 2011
New Revision: 1198116

URL: http://svn.apache.org/viewvc?rev=1198116&view=rev
Log:
Temporarilly revert OPENEJB-1330 as it seems to cause large regressions in the TCK.  We'll
have to figure it out and put it back.

Modified:
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java?rev=1198116&r1=1198115&r2=1198116&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java
(original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java
Sun Nov  6 00:45:08 2011
@@ -294,7 +294,7 @@ class AppInfoBuilder {
             clientInfo.localClients.addAll(clientModule.getLocalClients());
             clientInfo.remoteClients.addAll(clientModule.getRemoteClients());
             clientInfo.callbackHandler = applicationClient.getCallbackHandler();
-            clientInfo.moduleId = clientModule.getModuleId();
+            clientInfo.moduleId = getClientModuleId(clientModule);
             clientInfo.watchedResources.addAll(clientModule.getWatchedResources());
             clientInfo.validationInfo = ValidatorBuilder.getInfo(clientModule.getValidationConfig());
             clientInfo.uniqueId = clientModule.getUniqueId();
@@ -546,7 +546,7 @@ class AppInfoBuilder {
                 info.jarFiles.addAll(persistenceUnit.getJarFile());
                 info.classes.addAll(persistenceUnit.getClazz());
                 info.mappingFiles.addAll(persistenceUnit.getMappingFile());
-
+                
                 info.persistenceXMLSchemaVersion = persistence.getVersion();
                 info.sharedCacheMode = persistenceUnit.getSharedCacheMode().toString();
                 info.validationMode = persistenceUnit.getValidationMode().toString();
@@ -726,6 +726,17 @@ class AppInfoBuilder {
         }
     }
 
+    private static String getClientModuleId(ClientModule clientModule) {
+        String jarLocation = clientModule.getJarLocation();
+        File file = new File(jarLocation);
+        String name = file.getName();
+        if (name.endsWith(".jar") || name.endsWith(".zip")) {
+            name = name.replaceFirst("....$", "");
+        }
+        return name;
+    }
+
+
     private List<PortInfo> configureWebservices(Webservices webservices) {
         List<PortInfo> portMap = new ArrayList<PortInfo>();
         if (webservices == null) {



Mime
View raw message