Hi Owen,
Does compiling with -showWeaveInfo show whether your declare parents is or
is not working?
Andy.

2008/10/15 Owen Corpening <[EMAIL PROTECTED]>

> Probably a syntactical error, the before() in Log4jExecutionTracing never
> gets executed, I bet my "declare parents" isn't right, first time I ever
> came across that, I guess I haven't been keeping up with aj1.5:
>
> package com.AjlibTest;
> import org.codehaus.ajlib.util.tracing.Log4jExecutionTracing;
> public aspect TestTraceAspect extends Log4jExecutionTracing {
>     declare parents: com.AjlibTest.DummyObject implements Traced;
> }
>
> my package looks like this:
> ./com/AjlibTest/DummyObject.java
> ./com/AjlibTest/HelloWorld.java
> ./com/AjlibTest/TestTraceAspect.aj
>
> Anyone see my goof?
>
> thanks,
> owen
>
> ----- Original Message ----
> From: Ron Bodkin <[EMAIL PROTECTED]>
> To: aspectj-users@eclipse.org
> Sent: Tuesday, October 14, 2008 12:00:12 AM
> Subject: RE: [aspectj-users] question on ajlib:
>
>  Hi Owen,
>
>
>
> Traced is a protected interface that is defined within
> Log4jExecutionTracing itself. You just use the aspect by extending it and
> using declare parents to make the relevant classes you want to trace
> implement traced, as in:
>
>
>
> public aspect MyLog4jExecutionTracing extends Log4jExecutionTracing {
>
>      declare parents: com.bigboxco.myapp..* implements Traced;
>
> }
>
>
>
> *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On Behalf Of *Owen Corpening
> *Sent:* Thursday, October 09, 2008 6:41 AM
> *To:* aspectj-users@eclipse.org
> *Subject:* [aspectj-users] question on ajlib:
>
>
>
> With regards to ajlib:
>
> http://fisheye.codehaus.org/browse/ajlib-incubator/org.codehaus.ajlib
>
>
>
> There is a class Log4jExecutionTracing not covered in the unit tests and
> for which there are no examples of its usage. It uses a class called
> "Traced" that I don't see anywhere and I *think* that is at the core of my
> not comprehending how to use this class.
>
>
>
> Basically if I have a test tracing aspect like this it works great
> (DummyObject is the class whose methods are to be traced):
>
>
>
> package com.AjlibTest;
>
> import org.codehaus.ajlib.util.tracing.ExecutionTracing;
>
> public aspect TestTraceAspect extends ExecutionTracing
>
> {
>
>     public pointcut scope() : within(DummyObject);
>
>     before(): scope()
>
>     {
>
>          System.out.println("Tracing");
>
>     }
>
> }
>
>
>
> But if I change ExecutionTracing to Log4jExecutionTracing it doesn't weave
> anything (advice defined in com.AjlibTest.TestTraceAspect has not been
> applied [Xlint:adviceDidNotMatch]).
>
>
>
> much appreciated,
>
> Owen
>
>
>
>
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to