Hi Xalan people,

We (and some other Cocoon users) have come across a problem where if
effectively two threads happen to be compiling a stylesheet into
translet at the same time, threading issues seem to arise.

Once the translet is intially compiled however, simultaneous access of the
translet is no longer a problem.

AFAIK, the BCEL library is not thread safe by design, but there doesnt seem
to be any thread protection within the xsltc code that calls it.  Is this case,
or am I missing something? Im not very familiar with the xsltc code, so
I was hoping that someone can enlighten me here ?

These threading issues typically manifest themselves within static methods
of the bcel library.

Re apache.xalan.xsltc.trax.TemplatesHandlerImpl.java:

If I patch the code (that actually calls the bcel code) within the
getTemplates() method by adding a class-level synch block, this seems
to rectify the problem that we see. However, this seems like a very coarse
solution to me, and I dont what it means for performance issues if
anything.

Many thanks,
Michael Melhem




Reply via email to