Does JAXB use Woodstox parser for performance?

Is it possible to include your own parser, which, in my opinion, is based on Java reflection. We have some performance issues, and I wonder if we can switch the implementation.

Your advice is much appreciated.

Additional Information: This is legacy code, and we need to fix performance issues in our web services. I am looking for performance improvements without code changes. Existing code uses JAXB to sort and untie Java objects that are generated through CXF (wsdl-java).

My goal is to switch the implementation to sTax and then use the Woodstox library.

+4
source share
1 answer

If your JAXB implementation uses an under-cover StAX parser through the standard JAXP APIs, by adding Woodstox to your class path, force JAXB to use Woodstox. You should see a performance improvement by doing this.

Since the Woodstox jar contains the following entries, adding it to the classpath will allow the JAXP API to return an instance from it:

  • META-INF / services / javax.xml.stream.XMLInputFactory
  • META-INF / services / javax.xml.stream.XMLOuputFactory

Note. I run EclipseLink JAXB (MOXy) , and MOXy uses the StAX parser when available. Other JAXB implementations (Metro, JaxMe) probably do the same.

+9
source

Source: https://habr.com/ru/post/1345773/


All Articles