Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] debugging "with runtime test"?

I don't know if we have many tests for annotation style pointcuts
using annotation binding designators.  Does it behave any differently
using code style pointcuts?  the runtime test here is simple
reflection to obtain the annotation.  I've half an idea what it might
be - if you email me the .class file i will take a look

Andy.

On 30/11/06, Barry Kaplan <groups1@xxxxxxxxxxx> wrote:
I have advised that is getting weaved with a runtime test:

    @Pointcut("get(@com.foliofn.icconvert.folio1.account.SessionContext
org.hibernate.SessionFactory *.*) && @target(sc)")
    void sessionFactoryFieldGet(SessionContext sc){}

    @Pointcut("get(@com.foliofn.icconvert.folio1.account.SessionContext
org.hibernate.Session *.*) && @target(sc)")
    void sessionFieldGet(SessionContext sc){}

    @Around("sessionFactoryFieldGet(sc)")
    public SessionFactory getSessionFactory(JoinPoint jp, SessionContext
sc){
        return sessionFactories.get(sc.unitName());
    }

    @Around("sessionFieldGet(sc)")
    public Session getSession(JoinPoint jp, SessionContext sc){
        return sessionFactories.get(sc.unitName()).getCurrentSession();
    }

The advise never executes, but I cannot see why. I've turned on the
weavers debugging in aop.xml but that adds no new information. Is there
any way I get aspectj to log info at runtime on the actual checks?

-barry
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top