JAXB to use Woodstox parser for performance?

ⅰ亾dé卋堺 提交于 2019-12-04 09:10:18

If your JAXB implementation uses a StAX parser under the covers via the standard JAXP APIs, then adding the Woodstox jar to your classpath should cause your JAXB impl 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 APIs to return an instance of it:

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

Note: I lead EclipseLink JAXB (MOXy), and MOXy uses a StAX parser when one is available. The other JAXB implementations (Metro, JaxMe) probably do the same thing.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!