You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dw...@apache.org on 2009/01/19 19:26:42 UTC
svn commit: r735768 -
/geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
Author: dwoods
Date: Mon Jan 19 10:26:42 2009
New Revision: 735768
URL: http://svn.apache.org/viewvc?rev=735768&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/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
Modified: geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java?rev=735768&r1=735767&r2=735768&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java (original)
+++ geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java Mon Jan 19 10:26:42 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);
}
}