[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] pointcut definition problems


Hi all,

I'm working on refining a trace aspect and am having troubles pruning the output.  I would like to log the entry and exit of methods in the business code, but not in any getters or setters.  This is my pointcut:

        pointcut perfExecExec(ControllerCommandImpl controller):
                        cflowbelow(execution(* ControllerCommandImpl+.performExecute()))
                        && this(controller)
                        && !within(TraceAspect)
                        && within(com.business..*)
                        && !withincode(* *.get*(..));

(the cflowbelow() is added so we can log the session information with each statement.)

The problem is that when I log thisJoinPointStaticPart.getSignature().getDeclaringTypeName() and getSignature().getName(), I am getting:

-  java.lang.StringBuffer.append() (and other library methods) which I thought was blocked by the "within(com.business..*)" and
- any number of get() methods, both inside and outside of the com.business.* hierarchy

I've tried a number of variations of this pointcut, but none seem to work.  Considering that I'm not weaving either the Java runtime jars or any of our library jars, the appearance of entry and exit statements for library methods is really confusing me.  It makes me think there's something simple but profound that I am missing.  Can anyone spot it, because I'm lost.

Thanks!

cheers,
-adrian.
--
Adrian Powell
Centre for IBM e-Business Innovation :: Vancouver
apowell@xxxxxxxxxx / 604-297-3194