Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Trapping dodgy method calls

Hi,
 
I am currently looking at the extent to which AspectJ can be used to enhance object security.
 
If I write a pointcut that allows me to trap all calls to the public methods of my objects outside of the package it resides on, I can monitor these calls and make sure they are legal, or at least acceptable,and through reflection I can tell which objects are calling these methods.
 
But I understand that its possible (even though I wouldn't have a clue how to do it)  for one object to call a public method of another object loaded in the same JVM through introspecting the classloader. In other words there would be no matches on the pointcuts at compile time and the advices would not expect to be applied. So, what would happen at runtime if one object "illegally" called another's method? Is there any further runtime checking which would allow the advice to be matched?
 
Apologies if this question is full of hypotheticals (I know that 2 java programs would normally be launched in seprate JVMs!).
 
Thanks
 
Rob
 
 
 
 

Back to the top