Hi, Ed.
"Edward L. Knoll" <[EMAIL PROTECTED]> wrote on 2004-12-06 01:19:14 PM:
> We have a class that puts together a SAX processing chain. We have put
> together a threaded test driver to exercise instances of this class
> concurrently and we're seeing some anomalous behavior involving
> whitespace. We're seeing extra line breaks and non breaking spaces
> introduced into the final output stream.
>
> Each instance of this class has it's own instances of the core
> processing components:
>
> - Serializer (up to three instances per transformation thread)
> - XMLReader (never more than one per thread)
> - TransformerHandlers (up to two per transformation thread)
> - custom classes implementing the ContentHandler interface
>
> The only (static) class instances (knowingly) shared across these
> threads are:
>
> - Templates for different transformations we may perform.
> - Property generated from OutputPropertiesFactory configured for XML output.
> - Property generated from OutputPropertiesFactory configured for HTML
> output..
From your description, it sounds like you're putting together the pieces in a way that ought to be thread-safe.
I took a quick look at the classes that implement serialization, and I notice that the Serializer.setOutputFormat(Properties) maintains a reference to the argument Properties object that is passed in, as opposed to making a copy of it. Is it possible that your code makes changes to the Properties object that's produced by OutputPropertiesFactory before passing it to Serializer.setOutputFormat at the same time that some other Serializer is using that same Properties object?
I'm not saying that it's right or wrong for Serializer.setOutputFormat(Properties) to use a reference to the Properties object - just making an observation.
Thanks,
Henry
------------------------------------------------------------------
Henry Zongaro Xalan development
IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044
mailto:[EMAIL PROTECTED]
- Re: XSL template priority problem in SAX processing strea... Edward L. Knoll
- Re: XSL template priority problem in SAX processing strea... Joseph Kesselman
- Re: XSL template priority problem in SAX processing strea... david_marston
- Re: XSL template priority problem in SAX processing strea... Edward L. Knoll
- Re: XSL template priority problem in SAX processing strea... david_marston
- Re: XSL template priority problem in SAX processing strea... david_n_bertoni
- Problem with xsl:apply-templates parameters. Edward L. Knoll
- Re: Problem with xsl:apply-templates parameters. Brian Minchau
- Re: Problem with xsl:apply-templates parameters. Edward L. Knoll
- Threading / concurrency problem. Edward L. Knoll
- Re: Threading / concurrency problem. Henry Zongaro
- Re: Threading / concurrency problem. Brian Minchau
- Re: Threading / concurrency problem. Edward L. Knoll
- Re: Threading / concurrency problem. Henry Zongaro
- Re: Threading / concurrency problem. Edward L. Knoll
- question .... Edward L. Knoll
- Re: question .... Resolved Edward L. Knoll
- Concurrency issue .... Edward L. Knoll
- Other concurrency issues .... Edward L. Knoll
- Re: Other concurrency issues .... Brian Minchau
- Re: Concurrency issue .... resulved. Edward L. Knoll
