Hi Dave,
> Huh? What do you mean by "the transformation is locked"? The only
> locking
> that's done is to ensure that the counter that figures out when all of the
> threads are done is synchronized. This has _nothing_ to do with whether
> or
> not the compiled stylesheet or parsed source instances are thread-safe.
>
[Avula, Raj]
I was thinking that the locking is done for the syncronized acces of
resource(StylesheetRoot).
Sorry about this.
> What do you mean by "multiple concurrent requests"? The ThreadSafe sample
> does the following:
>
> Compile a stylesheet in the main thread.
> Parse a source document in the main thread.
> Start n threads to do transformations.
>
> You should _never_ be in this code if the source document has been
> pre-built. Did you modify the sample in any way? We've tested this one
> multiple platforms with thousands of threads and not found any problems.
>
[Avula, Raj] I am not reusing the source document(XML). Yes I
modified
thread safe sample to use RougeWave Threads. I am attaching the
modified
file.
> No, there's nothing special that needs to be done. Once you've asked a
> XalanTransformer to compile a stylesheet or parse a source document, that
> object is safe to share amongst threads. What's not safe is sharing a
> XalanTransformer instance amongst threads. Each thread has to have its
> own
> transformer, or you need to serialize access amongst threads, which is not
> really the best thing to do.
>
>
[Avula, Raj] I am only sharing the StylesheetRoot.
I downloaded the latest code today morning and when I try to build
it is giving the following error.
"XSLT/XalanTemplate.cpp", line 203.41: 1540-263: (S) Syntax error -
expected ";" or "," and found "theNodeTestSetType".
"XSLT/XalanTemplate.cpp", line 331.49: 1540-090: (S) Syntax error -
expected ";" and found "theMap".
"XSLT/XalanTemplate.cpp", line 333.26: 1540-013: (S) Identifier
"theMap" is undefined.
Thanks,
Raj.
[Avula, Raj] <<CTransform.cc>>
CTransform.cc