jaxp object caching for MessageFactory

前端 未结 1 1938
心在旅途
心在旅途 2021-01-18 12:29

Can the javax.xml.soap.MessageFactory be reused?
I.e.

msgFactory = MessageFactory.newInstance(); 

Can I cache msgFac

相关标签:
1条回答
  • 2021-01-18 12:38

    There's nothing in the javadoc to say that instances of MessageFactory are thread-safe, so I wouldn't make that assumption.

    However, within a single thread, there's nothing to stop you re-using a MessageFactory instance over and over again.

    0 讨论(0)
提交回复
热议问题