geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1028630 - /geronimo/server/branches/2.2/plugins/openjpa/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
Date Fri, 29 Oct 2010 07:00:34 GMT
Author: genspring
Date: Fri Oct 29 07:00:34 2010
New Revision: 1028630

URL: http://svn.apache.org/viewvc?rev=1028630&view=rev
Log:
GERONIMO-5452 PersistenceUnitBuilder cannot find persistence.xml on inPlace deployments, patch
from 	Ryan Sumner

Modified:
    geronimo/server/branches/2.2/plugins/openjpa/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java

Modified: geronimo/server/branches/2.2/plugins/openjpa/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/openjpa/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java?rev=1028630&r1=1028629&r2=1028630&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/openjpa/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
(original)
+++ geronimo/server/branches/2.2/plugins/openjpa/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
Fri Oct 29 07:00:34 2010
@@ -105,9 +105,18 @@ public class PersistenceUnitBuilder impl
 //            buildPersistenceUnits(persistence, module, module.getTargetPath());
         }
         try {
-            File rootBaseFile = module.getRootEarContext().getConfiguration().getConfigurationDir();
+            
+            File rootBaseFile;
+            URI moduleBaseURI;
+            if (module.getRootEarContext().getConfigurationData().getInPlaceConfigurationDir()
== null) {
+                rootBaseFile = module.getRootEarContext().getConfigurationData().getConfigurationDir();
+                moduleBaseURI = moduleContext.getBaseDir().toURI();
+            } else {
+                rootBaseFile = module.getRootEarContext().getConfigurationData().getInPlaceConfigurationDir();
+                moduleBaseURI = moduleContext.getConfigurationData().getInPlaceConfigurationDir().toURI();
+            }
             String rootBase = rootBaseFile.toURI().normalize().toString();
-            URI moduleBaseURI = moduleContext.getBaseDir().toURI();
+
             Map rootGeneralData = module.getRootEarContext().getGeneralData();
             ClassPathList manifestcp = (ClassPathList) module.getEarContext().getGeneralData().get(ClassPathList.class);
             if (manifestcp == null) {



Mime
View raw message