geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1071158 - /geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
Date Wed, 16 Feb 2011 06:54:12 GMT
Author: genspring
Date: Wed Feb 16 06:54:12 2011
New Revision: 1071158

URL: http://svn.apache.org/viewvc?rev=1071158&view=rev
Log:
OpenJPA can't handle the url when WEB-INF/classes PU was wrapped with "jar:" and "!/"

Modified:
    geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java?rev=1071158&r1=1071157&r2=1071158&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
Wed Feb 16 06:54:12 2011
@@ -165,7 +165,7 @@ public class PersistenceUnitGBean implem
     private static URL getPersistenceUnitRoot(Bundle bundle, String persistenceUnitRoot)
throws MalformedURLException {
         if (persistenceUnitRoot == null || persistenceUnitRoot.equals(".")) {
             return bundle.getEntry("/");
-        } else if (persistenceUnitRoot.endsWith("/")) {
+        } else if (persistenceUnitRoot.endsWith("/")|| persistenceUnitRoot.endsWith("WEB-INF/classes"))
{
             return bundle.getEntry(persistenceUnitRoot);
         } else {
             return new URL("jar:" + bundle.getEntry(persistenceUnitRoot) + "!/");



Mime
View raw message