JAXB ObjectFactory safe as a singleton?
843834Jan 28 2004 — edited Aug 18 2005I'm looking over some code written by someone else and they create a new ObjectFactory everytime they want to construct a response object. This seems like a really bad idea to me (i.e. causing lots of unecessary overhead).
My assumption was that people would apply a singleton pattern to the JAXB ObjectFactory; is that recommended? This also assumes that ObjectFactory objects are thread-safe (but I didn't see any
mention of that in the spec).