Berin Loritsch wrote:
>
> 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 Pars
Quoting Sylvain Wallez <[EMAIL PROTECTED]>:
> Hi team,
>
> After seeing the recent changes to Parser, I wondered why this component
> cannot be ThreadSafe. The answer is simple : Parser extends XMLProducer
> and thus setConsumer() must be called before parse().
>
> Searching for Parser use in t
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, includ
+10!
Sylvain Wallez wrote:
>
> Hi team,
>
> After seeing the recent changes to Parser, I wondered why this component
> cannot be ThreadSafe. The answer is simple : Parser extends XMLProducer
> and thus setConsumer() must be called before parse().
>
> Searching for Parser use in the sources, I
Sam Ruby a écrit :
>
> 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, i
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.
Carsten Ziegeler a écrit :
>
> Hi Sylvain,
>
> unfortunately the underlying JAXP classes (SAXParserFactory etc.)
> are not guaranteed to be thread safe. As the parser uses them
> in the parse method, it cannot be thread safe either.
According to the JAXP spec, small synchronized blocks around
Hi Sylvain,
unfortunately the underlying JAXP classes (SAXParserFactory etc.)
are not guaranteed to be thread safe. As the parser uses them
in the parse method, it cannot be thread safe either.
But changing the parser interface in a way you suggest, will be
considered when it's moved to Avalon (