[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Annotations weaving into a jar
|
Hello,
I am encountering problems trying to use annotations with AspectJ.
I have a jar library which provides me with all the tools I need to
connect to a back-end.
For access control purposes, I want to protect the calls performed with
this tool according to information concerning the current user.
I have this annotating aspect:
public aspect AnnotateAccessControl {
declare @method : JCO.Table JCO.ParameterList.getTable(..):
@AccessControl; //database request
}
And this advice testing the catching of the methods annotated like
above:
before(): within(CallingClass) && call( @AccessControl *
*.getTable(..)){
System.out.println("This should be controlled!");
}
I use AspectJ Compiler DEVELOPMENT built on Friday Jun 3, 2005 at
12:16:27 GMT
I use the -injars option for the compilation.
Here is the output of the compilation:
C:\Project\src\foo\AccessControl.aj:15 [warning] advice defined in
foo.AccessControl has not been applied [Xlint:adviceDidNotMatch]
Then at runtime, as expected due to the compilator's message, nothing is
caught. (running on Sun's JVM 1.5.0_02)
Is there something I did wrong ?
Thanks in advance,
Laurent