tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r813135 - /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java
Date Wed, 09 Sep 2009 21:59:10 GMT
Author: dblevins
Date: Wed Sep  9 21:59:10 2009
New Revision: 813135

URL: http://svn.apache.org/viewvc?rev=813135&view=rev
Log:
Quick addition to OPENEJB-1059 which process each URL (jar) individually as there may be several
modules in that list each with their own persistence.xml.  Only module type that does this
is ears, so it did't come out in the tests.

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java?rev=813135&r1=813134&r2=813135&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java
Wed Sep  9 21:59:10 2009
@@ -953,14 +953,17 @@
             appModule.getAltDDs().put("persistence.xml", persistenceUrls);
         }
 
-        // OPENEJB-1059: looking for an altdd persistence.xml file in all urls
-        // delegates to xbean finder for going throughout the list
-        ResourceFinder finder = new ResourceFinder("", ClassLoader.getSystemClassLoader(),
urls);
-        Map<String, URL> descriptors = getDescriptors(finder);
 
-        // if a persistence.xml has been found, just pull it to the list
-        if (descriptors.containsKey("persistence.xml")) {
-            persistenceUrls.add(descriptors.get("persistence.xml"));
+        for (URL url : urls) {
+            // OPENEJB-1059: looking for an altdd persistence.xml file in all urls
+            // delegates to xbean finder for going throughout the list
+            ResourceFinder finder = new ResourceFinder("", appModule.getClassLoader(), url);
+            Map<String, URL> descriptors = getDescriptors(finder);
+
+            // if a persistence.xml has been found, just pull it to the list
+            if (descriptors.containsKey("persistence.xml")) {
+                persistenceUrls.add(descriptors.get("persistence.xml"));
+            }
         }
     }
 



Mime
View raw message