Transforming classes from an agent, as per the example in the asm-guide.pdf

Stanislav Paskalev <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
Hello,

I'm having an issue with this code and any help will be appreciated :)

http://pastebin.com/c8Hpdbp4 - the transform(...) method
http://pastebin.com/UqXLZ6xD - the class modifying adapter
http://pastebin.com/145GzSzG - the method modifying adapter.

Forgive the fantasy names, I can't seem to get it working after the
transform() method. Calls to transforms do happen every time the jvm
loads a class, however when it hits the first line of it during debug
(with the class reader), it seems to completely leave this and instead
gets at
	TransformerManager.transform(ClassLoader, String, Class,
ProtectionDomain, byte[]) line: 175
	InstrumentationImpl.transform(ClassLoader, String, Class,
ProtectionDomain, byte[], boolean) line: 365
	Signal.dispatch(int) line: 189	

If I place a breakpoint at the second line of the transform method -
it's never reached.

The pdf suggested doing it this way, but something isn't right by me.

I'm loading my agent in a jvm running jboss and some j2ee-based custom
applications.

(also, as a side question - can I use asm to redefine classes from the
java runtime ?)

Thanks for reading all of this!

Regards,
Stanislav Paskalev
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.