Re: trouble with instrumenting interdependent classes
Rémi Forax <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
On 04/01/2011 11:43 AM, [email protected] wrote: > 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 Usually it's because your transformer throws an exception during the instrumentation of Connectionimpl. So the VM disable the transformer and doesn't call it anymore. Inserting a try/catch block around your transform method will solve the problem. Rémi
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