Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » pointcuts using annotations
pointcuts using annotations [message #593588] Tue, 09 May 2006 07:20
Jimisola Laursen is currently offline Jimisola Laursen
Messages: 134
Registered: July 2009
Senior Member
Hi!

Newbie to AOP and even though I read up prior to actually starting I have a
problem with a simple pointcut.

1. I want to declare a pointcut that matches methods that:
i. makes calls to all getters in xyz.SomeBean (is not that possible?)
and
ii. are in classes in the package abc and have the annotation
@Transactional
2. I want to mark those poincuts with an error


package abc;

public class ABC
{
/**
* @Transactional
*/
public void doSomething() {return;}
}


a) It works to just match 1.i.

pointcut ALL(): call(* xyz.SomeBean.get*(..));

b) Then I thought that

pointcut ONLYANNOTATED_1(): @Transactional * *(..) && call(*
xyz.SomeBean.get*(..));

would work but nope. Hence, I never tried to narrow down the pointcut just
to match method annotations in the abc package.

Neither does:

pointcut ONLYANNOTATED_2(): @Transactional * *(..);


The error message I get in Eclipse/AJDT is:

"Syntax error on token "Transactional", "pointcut name" expected"


Can anyone help me with the correct syntax?

Regards,
Jimisola
Previous Topic:calling aspectj compiler programmatically
Next Topic:pointcuts using annotations
Goto Forum:
  


Current Time: Mon Apr 21 08:52:56 EDT 2014

Powered by FUDForum. Page generated in 0.10000 seconds