geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r735769 - /geronimo/server/branches/2.1/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
Date Mon, 19 Jan 2009 18:29:38 GMT
Author: dwoods
Date: Mon Jan 19 10:29:38 2009
New Revision: 735769

URL: http://svn.apache.org/viewvc?rev=735769&view=rev
Log:
GERONIMO-4468 <jar-file> elements are interpreted relatively to EAR root instead of
persistence unit.  Applied patch Geronimo-4468.patch from Ivan.

Modified:
    geronimo/server/branches/2.1/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java

Modified: geronimo/server/branches/2.1/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java?rev=735769&r1=735768&r2=735769&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
(original)
+++ geronimo/server/branches/2.1/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
Mon Jan 19 10:29:38 2009
@@ -92,8 +92,10 @@
         List<URL> jarFileUrls = NO_URLS;
         if (!excludeUnlistedClassesValue) {
             jarFileUrls = new ArrayList<URL>();
+            //Per the EJB3.0 Persistence Specification section 6.2, the jar-file should be
related to the Persistence Unit Root, which is the jar or directory where the persistence.xml
is found             
+            URI persistenceUnitBaseURI = configurationBaseURI.resolve(persistenceUnitRoot);
             for (String urlString: jarFileUrlsUntyped) {
-                URL url = configurationBaseURI.resolve(urlString).normalize().toURL();
+                URL url = persistenceUnitBaseURI.resolve(urlString).normalize().toURL();
                 jarFileUrls.add(url);
             }
         }



Mime
View raw message