cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: ThreadSafe Parser
Date Wed, 31 Oct 2001 15:07:59 GMT
Quoting Sylvain Wallez <sylvain.wallez@anyware-tech.com>:

> 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 found that it doesn't seem to
> be used as an XMLProducer, but always as a Parser, and that the two
> calls setConsumer() and parse() always come together.
> 
> So, what about a stateless interface for parsing, which would simply
> mean moving the XMLConsumer parameter from setConsumer() to parse() ?
> 
> interface StatelessParser extends DOMFactory {
>   void parse(InputSource source, XMLConsumer consumer);
>   void parse(InputSource source, ContentHandler ch);
>   Document parseDocument(InputSource is);
> }
> 
> Since XML parsing is widely used, this would be a step further for
> speeding up Cocoon.
> 
> Thoughts ?

I was under the impression that xml parsers (at least Xerces) couldn't be thread 
safe.

Giacomo

> -- 
> Sylvain Wallez
> Anyware Technologies - http://www.anyware-tech.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message