Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Getting EJB pointcut right

Hello list,

I have some difficulties defining a pointcut for EJBs. My intention is
that the associated advice should be executed whenever a method of the
home or the remote interface is called. Problem here is, that I want
to advice some code in the bean implementation. I have an EJB called
Person defined by these interfaces/classes (EJB1.1):

Person - Remote interface
PersonBean - Bean implementation (extends an EJB adapter class called
AbstractEntityBean)
PersonHome - Home interface

My pointcut looks like this:

public pointcut authOperations ( AbstractEntityBean aeb ) :
       target ( PersonBean ) && this ( aeb ) &&
       (
           call ( * *.set* (..) ) ||
           call ( * *.findBy* (..) ) ||
           call ( * *.get* (..) )
       );

But it doesn't match. I am sure this problem must be somehow solveable
by the cflow predicate, but I am not able to get it right.

Any hints?

Kind regards,
Franz



Back to the top