You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2007/01/31 17:28:57 UTC

svn commit: r501884 - /cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/conf/UnitDescriptorParser.java

Author: aadamchik
Date: Wed Jan 31 08:28:56 2007
New Revision: 501884

URL: http://svn.apache.org/viewvc?view=rev&rev=501884
Log:
can't call reset on the parser - some parsers blow in this functionality

Modified:
    cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/conf/UnitDescriptorParser.java

Modified: cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/conf/UnitDescriptorParser.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/conf/UnitDescriptorParser.java?view=diff&rev=501884&r1=501883&r2=501884
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/conf/UnitDescriptorParser.java (original)
+++ cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/conf/UnitDescriptorParser.java Wed Jan 31 08:28:56 2007
@@ -104,13 +104,15 @@
     /**
      * Loads and returns a Collection of PersistenceUnitInfos from the XML descriptor.
      */
-    public synchronized Collection<JpaUnit> getPersistenceUnits(
+    public Collection<JpaUnit> getPersistenceUnits(
             InputSource in,
             final URL persistenceUnitRootUrl) throws SAXException, IOException,
             ParserConfigurationException {
 
         final Collection<JpaUnit> unitInfos = new ArrayList<JpaUnit>(2);
 
+        // note that parser is not reused - some parser implementations blow on
+        // parser.reset() call
         SAXParser parser = parserFactory.newSAXParser();
         parser.parse(in, new DefaultHandler() {