Sam Ruby wrote:
> 
> Sylvain Wallez wrote:
> >
> > According to the JAXP spec, small synchronized blocks around calls to
> > SAXParserFactory.newSAXParser() and
> > DocumentBuilderFactory.newDocumentBuilder() should to the trick. This is
> > faster than pooling that involves much more code, including some
> > synchronized blocks.
> 
> My experience has been that pooling is considerably faster, at least with
> Xerces1.

Sam, has Xerces fixed the concurrency issues with their Parser?  Basically
what happened is the Parser could be reused until a SAXException happened
(something about a class not being found or something weird like that),
and once that SAXException happened, the Parser would always produce it.
The load didn't have to be that high either (something like 10 concurrent
requests every 300 ms [Apache JMeter]) would reproduce the problem.

That is the main reason why we moved to Factory based parsers.

-- 

"Those who would trade liberty for
 temporary security deserve neither"
                - Benjamin Franklin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to