Results 1 to 2 of 2

Thread: Problem with extending abstract aspect

  1. #1
    Join Date
    May 2008
    Posts
    3

    Post Problem with extending abstract aspect

    I have a simple abstract aspect:

    @Aspect
    public abstract class HelloFromAspectJ {

    // abstract pointcut: no expression is defined
    @Pointcut
    public abstract void scope();

    @AfterReturning ("scope()")
    public void after() {
    .....
    }
    }

    and an aop.xml file:

    <aspectj>
    <aspects>
    <concrete-aspect name="org.aspectprogrammer.hello.aspectj.Test" extends="org.aspectprogrammer.hello.aspectj.HelloF romAspectJ">
    <pointcut name="scope" expression="execution(* main(..))"/>
    </concrete-aspect>
    </aspects>

    <weaver options="-verbose -debug -showWeaveInfo">
    </weaver>
    </aspectj>


    and this aspect doesn't put the advice after the method main().

    the console output:
    INFO: Found Spring's JVM agent for instrumentation
    [AppClassLoader@184fb5] info AspectJ Weaver Version 1.6.0 built on Wednesday Apr 23, 2008 at 20:27:36 GMT
    [AppClassLoader@184fb5] info register classloader sun.misc.Launcher$AppClassLoader@184fb5
    [AppClassLoader@184fb5] info using configuration /D:/workspace_amedic/auditing/test/TestJavaAspectJSpring/bin/META-INF/aop.xml
    [AppClassLoader@184fb5] info define aspect org.aspectprogrammer.hello.aspectj.Test
    [AppClassLoader@184fb5] debug weaving 'org.aspectprogrammer.hello.aspectj.Test'
    [AppClassLoader@184fb5] debug generating class 'org.aspectprogrammer.hello.aspectj.Test'
    [AppClassLoader@184fb5] debug weaving 'org.springframework.context.support.AbstractAppli cationContext$BeanPostProcessorChecker'
    [AppClassLoader@184fb5] debug weaving 'org.springframework.context.HierarchicalMessageSo urce'
    [AppClassLoader@184fb5] debug weaving 'org.springframework.context.support.DelegatingMes sageSource'
    [AppClassLoader@184fb5] debug weaving 'org.springframework.context.NoSuchMessageExceptio n'
    [AppClassLoader@184fb5] debug weaving 'org.springframework.context.event.SimpleApplicati onEventMulticaster'
    [AppClassLoader@184fb5] debug weaving 'org.springframework.context.event.AbstractApplica tionEventMulticaster'
    [AppClassLoader@184fb5] debug weaving 'org.springframework.core.task.TaskExecutor'
    [AppClassLoader@184fb5] debug weaving 'org.springframework.core.task.SyncTaskExecutor'
    [AppClassLoader@184fb5] debug weaving 'org.springframework.context.ApplicationListener'
    [AppClassLoader@184fb5] debug weaving 'org.springframework.beans.factory.SmartFactoryBea n'
    2008.05.15 16:17:29 org.springframework.beans.factory.support.DefaultL istableBeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@28068f: defining beans [helloService,org.springframework.context.weaving.A spectJWeavingEnabler#0,loadTimeWeaver]; root of factory hierarchy
    [AppClassLoader@184fb5] debug weaving 'org.springframework.context.event.SimpleApplicati onEventMulticaster$1'


    please help...

  2. #2
    Join Date
    May 2008
    Posts
    3

    Default

    It's all working.I hade a conflict with my jar's.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •