Please see my other note Re: xalan creates threads and so is not ejb
compliant???. We're doing a fair amount of work on this and things should
be better after the next release.
-scott
Alan Canon
<a.canon@worldne To: [EMAIL PROTECTED]
t.att.net> cc: (bcc: Scott Boag/CAM/Lotus)
Subject: ServletFilter+Xalan:
Multithreading and
05/28/2001 03:18 StreamSource/StreamResult
PM
Please respond
to xalan-dev
I have a servlet filter that filters XSLT from a servlet. It is
<? PI ?> aware and pretty cuspy. I have tried invoking
FilterChain.doFilter() in a separate thread with a PipedWriter
connected to a PipedReader which I attach to my Tranformer's
StreamSource. The intent is that if the Transformer can do its job
in token-at-a-time streaming fashion, I can avoid having an
intermediate String buffer (which works well, enabling XSLT in
the servlet filter in a single-threaded fashion.)
The multi-threaded approach seems to work when everything is just
right, but I can't seem to use it everywhere yet. It works on
iPlanet iWS 6.0 beta for NT (great) but is shaky on Solaris8,
same web server (not so great, as Solaris is my preferred
environment (and, secretly, Melinda Gates, I'll venture.))
For now I have reverted to having a String buffer. I haven't
tried to stretch the String buffer to see how big I can make it,
but it could be megabytes someday if someone downloads a big report.
So what about multithreading and Xalan? Can the tranformer be made
to produce output before the end of input? Does it do this already?
What are some thoughts on Xalan in a streaming environment.