You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by yo...@apache.org on 2007/09/19 22:15:40 UTC

svn commit: r577432 - /lucene/solr/trunk/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java

Author: yonik
Date: Wed Sep 19 13:15:39 2007
New Revision: 577432

URL: http://svn.apache.org/viewvc?rev=577432&view=rev
Log:
clarify stax comments, change logging level

Modified:
    lucene/solr/trunk/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java

Modified: lucene/solr/trunk/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java?rev=577432&r1=577431&r2=577432&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java Wed Sep 19 13:15:39 2007
@@ -83,12 +83,18 @@
     
     inputFactory = BaseXMLInputFactory.newInstance();
     try {
+      // The java 1.6 bundled stax parser (sjsxp) does not currently have a thread-safe
+      // XMLInputFactory, as that implementation tries to cache and reuse the
+      // XMLStreamReader.  Setting the parser-specific "reuse-instance" property to false
+      // prevents this.
+      // All other known open-source stax parsers (and the bea ref impl)
+      // have thread-safe factories.
       inputFactory.setProperty("reuse-instance", Boolean.FALSE);
     }
     catch( IllegalArgumentException ex ) {
-      // The java 1.5 com.bea.xml does not support this property, but behaves properly in a
-      // multi-threaded environment.  Ignore the error for 1.5
-      log.info( "Unable to set the 'reuse-instance' property for the input factory: "+inputFactory );
+      // Other implementations will likely throw this exception since "reuse-instance"
+      // isimplementation specific.
+      log.fine( "Unable to set the 'reuse-instance' property for the input factory: "+inputFactory );
     }
   }