Hi Michael, This is the first time I hear about race conditions in relation to BCEL. However, I think that what you're describing is indeed plausible (yet, it seems, never caught by our multi-threaded tests). I'm going to start looking into this; if you have any additional info that could help us isolate the problem, we'd appreciate it.
Thanks. -- Santiago ----- Original Message ----- From: "Michael Melhem" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 10, 2003 6:16 AM Subject: Possible threading issue with xsltc and BCEL ?? > 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 > > > >
