Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.0
    • Fix Version/s: 1.0.1
    • Component/s: XML
    • Labels:
      None
    • Environment:
      all

      Description

      Our webservices rely heavily on extracting data from xml-messages with xpath.
      The example you give in the reference documentation, chapter 4.2.1 regarding XPathExpression suggests creating an XPathExpression with a factory and inject it into the WebService, that needs the expression.

      In a Java 5.0 environment the implementation of XPathExpression would be Jaxp13XPathExpression (as found here: http://fisheye1.cenqua.com/browse/springframework/spring-projects/spring-ws-core/src/java/org/springframework/xml/xpath/Jaxp13XPathExpressionFactory.java?r=1.1), which just delegates to javax.xml.xpath.XPathExpression without any synchronization.
      But the Javadocs for java.xml.xpath.XPathExpression (http://java.sun.com/javase/6/docs/api/javax/xml/xpath/XPathExpression.html) state that this is not thread-safe.
      So multiple concurrent requests into the Webservice with the injected XPathExpression would cleary violate thread-safety.

      The question is, who schould do synchronization. If you suggest, application code should ensure thread-safety, this sould be at least documented in the examples.

      What do you think is the best way to benefit from compiled (fast) XPathExpressions without throttling throuput?

        Attachments

          Activity

            People

            • Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              soeren.chittka@googlemail.com Sören Chittka
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: