geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r555182 - in /geronimo/server/trunk/modules: geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/ geronimo-web-2.5-builder/src/main/java/org/apache/...
Date Wed, 11 Jul 2007 06:19:11 GMT
Author: djencks
Date: Tue Jul 10 23:19:10 2007
New Revision: 555182

URL: http://svn.apache.org/viewvc?view=rev&rev=555182
Log:
GERONIMO-3307 fix a problem with identifying which module a persistence unit is supposed to
be associated

Modified:
    geronimo/server/trunk/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java
    geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
    geronimo/server/trunk/modules/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java

Modified: geronimo/server/trunk/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java?view=diff&rev=555182&r1=555181&r2=555182
==============================================================================
--- geronimo/server/trunk/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java
(original)
+++ geronimo/server/trunk/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java
Tue Jul 10 23:19:10 2007
@@ -259,7 +259,7 @@
      * Used only in PersistenceUnitBuilder to figure out if a persistence.xml relates to
the starting module.  Having a classloader for
      * each ejb module would eliminate the need for this and be more elegant.
      */
-    public void getCompleteManifestClassPath(JarFile moduleFile, URI moduleBaseUri, ClassPathList
classpath, ModuleList exclusions) throws DeploymentException {
+    public void getCompleteManifestClassPath(JarFile moduleFile, URI moduleBaseUri, URI resolutionUri,
ClassPathList classpath, ModuleList exclusions) throws DeploymentException {
         Manifest manifest;
         try {
             manifest = moduleFile.getManifest();
@@ -297,15 +297,17 @@
                 throw new DeploymentException("target path must not end with a '/' character:
" + targetUri);
             }
             String classpathEntry = targetUri.toString();
-            //don't get caught in circular references
-            if (classpath.contains(classpathEntry)) {
+            if (exclusions.contains(classpathEntry)) {
                 continue;
             }
-            if (exclusions.contains(classpathEntry)) {
+            URI resolvedUri = resolutionUri.resolve(pathUri);
+            String resolvedEntry = resolvedUri.toString();
+            //don't get caught in circular references
+            if (classpath.contains(resolvedEntry)) {
                 continue;
             }
-            classpath.add(classpathEntry);
-            File targetFile = getTargetFile(targetUri);
+            classpath.add(resolvedEntry);
+            File targetFile = getTargetFile(resolvedUri);
             JarFile classPathJarFile;
             try {
                 classPathJarFile = new JarFile(targetFile);
@@ -313,7 +315,7 @@
                 throw new DeploymentException("Manifest class path entries must be a valid
jar file (JAVAEE 5 Section 8.2): jarFile=" + targetFile + ", path=" + path, e);
             }
 
-            getCompleteManifestClassPath(classPathJarFile, targetUri, classpath, exclusions);
+            getCompleteManifestClassPath(classPathJarFile, targetUri, resolutionUri, classpath,
exclusions);
         }
     }
 

Modified: geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java?view=diff&rev=555182&r1=555181&r2=555182
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
Tue Jul 10 23:19:10 2007
@@ -20,7 +20,6 @@
 import java.io.IOException;
 import java.net.URI;
 import java.net.URL;
-import java.net.MalformedURLException;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
@@ -477,7 +476,8 @@
         manifestcp.add(module.getTargetPath());
         EARContext moduleContext = module.getEarContext();
         ModuleList moduleLocations = (ModuleList) module.getRootEarContext().getGeneralData().get(ModuleList.class);
-        moduleContext.getCompleteManifestClassPath(module.getModuleFile(), URI.create(module.getTargetPath()),
manifestcp, moduleLocations);
+        URI baseUri = URI.create(module.getTargetPath());
+        moduleContext.getCompleteManifestClassPath(module.getModuleFile(), baseUri, baseUri,
manifestcp, moduleLocations);
         moduleContext.getGeneralData().put(ClassPathList.class, manifestcp);
 
         for (ModuleBuilderExtension builder : moduleBuilderExtensions) {

Modified: geronimo/server/trunk/modules/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java?view=diff&rev=555182&r1=555181&r2=555182
==============================================================================
--- geronimo/server/trunk/modules/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
Tue Jul 10 23:19:10 2007
@@ -327,7 +327,8 @@
         EARContext moduleContext = module.getEarContext();
         ClassPathList manifestcp = (ClassPathList) moduleContext.getGeneralData().get(ClassPathList.class);
         ModuleList moduleLocations = (ModuleList) module.getRootEarContext().getGeneralData().get(ModuleList.class);
-        moduleContext.getCompleteManifestClassPath(module.getModuleFile(), URI.create(module.getTargetPath()).resolve(RELATIVE_MODULE_BASE_URI),
manifestcp, moduleLocations);
+        URI baseUri = URI.create(module.getTargetPath());
+        moduleContext.getCompleteManifestClassPath(module.getModuleFile(), baseUri, baseUri.resolve(RELATIVE_MODULE_BASE_URI),
manifestcp, moduleLocations);
 
 
         WebAppType webApp = (WebAppType) module.getSpecDD();



Mime
View raw message