RE: trouble with instrumenting interdependent classes
"Tim Eck" <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <01cb01cbf099$0164b1f0$042e15d0$@com> |
Can't tell for sure if this is what is happening to you but I'm fairly certain class transformers are not-reentrant unfortunately. So if in the middle of your transform() method you end up loading a class that would end up calling back into the same transformer it will just get skipped -- it is a very annoying "feature". I'd google around on this for more information and possible workarounds. I think one hack is to use another thread since the flag for this is thread local I believe. If you are indeed hitting this problem and find a solution/workaround please report back Good luck -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Friday, April 01, 2011 2:43 AM To: [email protected] Subject: [asm] trouble with instrumenting interdependent classes Hi, I'm facing an issue while instrumenting two classes that are interdependent. The classes in dispute are com/mysql/jdbc/ConnectionImpl & com/mysql/jdbc/PreparedStatement. I'm instrumenting the method ConnectionImpl.prepareStatement() which returns an instance of PreparedStatement. There is also a rule defined to instrument certain methods in PreparedStatement. My ClassFileTransformer implementation is not called at all while loading PreparedStatement whenever I instrument ConnectionImpl. However, if I disable instrumenting ConnectionImpl everything seems to work fine! Any special case I have to handle here? or am I missing something here? thanks, ramanr
message-footer.txt
(text/plain, 238 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws