Hi All, I don't think synchronizing on any set of functions will solve the problem. EndpointReference is using XmlUtils.EMPTY_DOC i.e. a single document instance for every thread. As Dong said, according the the javadocs ( and XmlUtils.createBuilder() of course ^_^) you must use a DocumentBuilder per thread, the documents used within it cannot be used safely across threads (or the document builder itself) when involving writes.
So unless I'm missing something (always possible) EndpointReference should be using XmlUtils.createDocument() instead (lines 124, 175 and 239). I think its a bug, and if its agreed to be one, I'll have a look for others (72 references to EMPTY_DOC in the codebase) as this is also very important to me, and raise Jiras with patches off the 2.2 code. Vinh/Dong is it possible to verify this works as a fix? cheers, Chris PS(If any one wants me to make patches against latest HEAD instead, let me know) -----Original Message----- From: Vinh Nguyen (vinguye2) [mailto:[EMAIL PROTECTED] Sent: Friday, August 31, 2007 8:02 PM To: [email protected] Cc: [EMAIL PROTECTED] Subject: RE: EndpointReference thread-safe? Hi Dong, Have you found a resolution on this yet? Looks like you are encountering a problem we're seeing now, too. Synchronize on setting the producer EPR is probably not the best solution because this really slows things down, especially if you have to generate large numbers of notifications. -Vinh -----Original Message----- From: dnguyen [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 04, 2007 9:45 AM To: [email protected] Subject: Re: EndpointReference thread-safe? The only thing that works is to synchronize on the producer EPR, since making copies of it does not seem to work. Does this mean that the EPR deep copy or Xerces deep copy is broken? Anyway, this effectively serializes all notifies to any consumers, which impacts scalability to a certain degree. -- View this message in context: http://www.nabble.com/EndpointReference-thread-safe--tf3506487.html#a983 9159 Sent from the Muse User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
