Hi

I encountered problems in a multithreaded instrumentation layer I made over BCEL. As 
soon as I have to thread it generates bad method signatures. I read the following post 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg00201.html, which warns about this 
issue.

Indeed there is in classfile.Utility and generic.Type class only static methods, but 
several methods are getting/setting the same static field consumed_chars in several 
loops. When using BCEL in app server environment, you always have concurent 
classloading in different classloader (proxy, skel / stub, CMP impl ...).

Those 2 classes are really bad designed. Such an issue requires a minimal effort to 
provide a patch and ensure thread safety.
I have made a patch based on a ThreadLocal wrapping of consumed_chars. I would really 
appreciate if it could be incorporated in next release. Let me know if/where/how I 
have to provide a diff for it instead of packaging my own bcel-patch.jar with my app.

Alex

Reply via email to