Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Is there an easier way to do this?

Hi,

I have a solution for my application which works but I think its not the best one.

I have a pointcut time() where I actually want to enhance my method of my ejb. In every bean I need some information from the setSessioncontext method which I extract with the sessionContext pointcut. I do this now everywhere and only need to
do this in the classes where the time() pointcut is woven into the code.

I there a way I can make these pointcuts smarter?
the sessionContext() should only be included when the time() pointcut hits.

The code looks like this right now:
pointcut time() :
   execution(* *.sayHello(..));
pointcut sessionContext(SessionContext context):
       execution(* *.setSessionContext(..))
&& args(context);
Thanks,
Michae Dempflel



Back to the top