Is it possible to instrument classess from java or javax package with AspectJ?
Dragan Stankovic
Ranch Hand
Joined: Oct 14, 2008
Posts: 33
posted
0
I've tried a couple of AspectJ examples recently and I liked what they allowed me to do. Then I tried to instrument some java swing and java core classes (I was just curious how stuff works from inside) and I failed to do that. Is this forbidden on purpose (e.g. security reasons) or there is a workaround... What if I really need to do something like that, is it possible?
What if I really need to do something like that, is it possible?
This sentence is especially meant for discussion because what I meant with it is to ask the book author if AspectJ is the best solution for this kind of a problem.
Yes, AspectJ can instrument all those classes. That is why AspectJ is so very powerful. that you can instrument classes that your don't have the source code too.
Before that I encountered some misleading pages, mentioning dynamic weaving, security, etc., and because I am relatively new to the subject I falsely assumed that this is related to security. Since I wasn't sure that I understand things correctly I've decided to check that by posting question here. This proved as a good decision at the end (I found the answer)
Thanks!
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Is it possible to instrument classess from java or javax package with AspectJ?