Re: RE: trouble with instrumenting interdependent classes
Rajaraman Santhanam <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <12f33ed3a6e.-9110275347033955608.-827042837025550699@zohocorp.com> |
Hi, @ Tim - Based on my analysis, I can conclude am not facing the problem scenario you have reported. Besides, shouldn't the VM resolve all the dependency before loading a class. However I noticed something strange. Since I'm in development phase, I keep the CheckClassAdapter in between before returning the transformed byte-code. If I remove this adapter everything works fine. I haven't got the time to analyze further in this regard. Will post if I find out something. Thanks, Rajaraman ---- On Fri, 01 Apr 2011 23:47:15 +0530 Tim Eck <[email protected]> wrote ---- 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