openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r902819 - in /openjpa/branches/2.0.0-beta: openjpa-kernel/src/main/java/org/apache/openjpa/conf/ openjpa-kernel/src/main/java/org/apache/openjpa/meta/ openjpa-persistence/src/main/java/org/apache/openjpa/persistence/
Date Mon, 25 Jan 2010 14:29:41 GMT
Author: dwoods
Date: Mon Jan 25 14:29:41 2010
New Revision: 902819

URL: http://svn.apache.org/viewvc?rev=902819&view=rev
Log:
OPENJPA-1460 merged in r902291
 from trunk

Modified:
    openjpa/branches/2.0.0-beta/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java
    openjpa/branches/2.0.0-beta/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
    openjpa/branches/2.0.0-beta/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java
    openjpa/branches/2.0.0-beta/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java

Modified: openjpa/branches/2.0.0-beta/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.0-beta/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java?rev=902819&r1=902818&r2=902819&view=diff
==============================================================================
--- openjpa/branches/2.0.0-beta/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java
(original)
+++ openjpa/branches/2.0.0-beta/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java
Mon Jan 25 14:29:41 2010
@@ -18,7 +18,6 @@
  */
 package org.apache.openjpa.conf;
 
-import java.net.URL;
 import java.util.Collection;
 import java.util.Map;
 
@@ -1800,22 +1799,5 @@
      * @since 2.0.0
      */
     public String getDataCacheMode();
-    
-    /**
-     * Set the persistent unit root url.
-     * 
-     * @see PersistenceUnitInfo#getPersistenceUnitRootUrl()
-     * 
-     * @param the persistent unit root url
-     * @since 2.0.0
-     */
-    public void setPersistenceUnitRootUrl(URL url);
-    
-    /**
-     * Return the persistent unit rool URL
-     * @return URL
-     * @since 2.0.0
-     */
-    public URL getPersistenceUnitRootUrl();
 }
 

Modified: openjpa/branches/2.0.0-beta/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.0-beta/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java?rev=902819&r1=902818&r2=902819&view=diff
==============================================================================
--- openjpa/branches/2.0.0-beta/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
(original)
+++ openjpa/branches/2.0.0-beta/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
Mon Jan 25 14:29:41 2010
@@ -18,7 +18,6 @@
  */
 package org.apache.openjpa.conf;
 
-import java.net.URL;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Map;
@@ -178,7 +177,7 @@
     private Collection<String> supportedOptions = new HashSet<String>(33);
     private final StoreFacadeTypeRegistry _storeFacadeRegistry = new StoreFacadeTypeRegistry();
     private BrokerFactoryEventManager _brokerFactoryEventManager = new BrokerFactoryEventManager(this);
-    private URL _puRootUrl;    
+        
 
     /**
      * Default constructor. Attempts to load global properties.
@@ -1695,14 +1694,5 @@
     public String getDataCacheMode() {
         return dataCacheMode.getString();
     }
-    
-    public void setPersistenceUnitRootUrl(URL url) {
-        this._puRootUrl = url;
-    }
-    
-    public URL getPersistenceUnitRootUrl() {
-        return _puRootUrl;
-    }
-    
 }
 

Modified: openjpa/branches/2.0.0-beta/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.0-beta/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java?rev=902819&r1=902818&r2=902819&view=diff
==============================================================================
--- openjpa/branches/2.0.0-beta/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java
(original)
+++ openjpa/branches/2.0.0-beta/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java
Mon Jan 25 14:29:41 2010
@@ -752,28 +752,8 @@
                     if (log.isTraceEnabled())
                         log.trace(_loc.get("scanning-resource", rsrc));
                     mitr = new ResourceMetaDataIterator(rsrc, loader);
-                    
-                    URL puUrl  = repos.getConfiguration().getPersistenceUnitRootUrl();
-                    String puUrlString = puUrl == null ? null : puUrl.toString();
-                    if (log.isTraceEnabled())
-                        log.trace(_loc.get("pu-root-url", puUrlString));
-                    
-                    List<URL> urls = new ArrayList<URL>(3);
                     while (mitr.hasNext()) {
                         url = (URL) mitr.next();
-                        String urlString = url.toString();
-                        if (log.isTraceEnabled())
-                            log.trace(_loc.get("resource-url", urlString));
-                        if (puUrlString != null) {
-                            if (urlString.indexOf(puUrlString) != -1)
-                                urls.add(url);
-                        } else 
-                            urls.add(url);
-                    }
-                    mitr.close();
-                    
-                    for (Object obj : urls) {
-                        url = (URL) obj;
                         clss = cparser.parseTypeNames(new URLMetaDataIterator
                             (url));
                         List<String> newNames = Arrays.asList(clss);
@@ -783,6 +763,7 @@
                         names.addAll(newNames);
                         mapPersistentTypeNames(url, clss);
                     }
+                    mitr.close();
                 }
             }
         }

Modified: openjpa/branches/2.0.0-beta/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.0-beta/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java?rev=902819&r1=902818&r2=902819&view=diff
==============================================================================
--- openjpa/branches/2.0.0-beta/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
(original)
+++ openjpa/branches/2.0.0-beta/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
Mon Jan 25 14:29:41 2010
@@ -187,11 +187,6 @@
                 }
             }
 
-            OpenJPAConfiguration conf = factory.getConfiguration();
-            // OPENJPA-1460 Fix scope visibility of orm.xml when it is packaged in both ear
file and war file
-            conf.setPersistenceUnitRootUrl(pui.getPersistenceUnitRootUrl());
-            _log = conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
-
             // Create appropriate LifecycleEventManager
             loadValidator(factory);
             



Mime
View raw message