Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] help and ideas on lazy loading thru aspectj

As the error says, you have not bound the formal 'loadingProperties' in your pointcut reference.

before( LazyLoading loadingProperties, FilteredLoader owner ) : lazyLoadedRead( annotation, owner ){

where do you bind loadingProperties?

What you need to do is:

before( LazyLoading annotation, FilteredLoader owner ) : lazyLoadedRead( annotation, owner ){

or

before( LazyLoading loadingProperties, FilteredLoader owner ) : lazyLoadedRead( loadingProperties, owner ){

I'm not commenting on the per-clause here, just saying whats wrong with your pointcut and advice.

cheers,
Andy.

2008/10/27 Luca Ferrari <fluca1978@xxxxxxxxxxx>
I've simplified the system, for now, but I'm having an error while building the
aspect, that should be quite simple:

public aspect LazyLoadingAspect perthis(FilteredLoader) {

   pointcut lazyLoadedRead( LazyLoading loadingProperties, FilteredLoader
owner ) :
                                                             get( @LazyLoading
Collection<SerializableObject+> SerializableObject+.* )
                                                             &&
                                                             @annotation(loadingProperties)
                                                             &&
                                                             target(owner)
                                                             ;

   before( LazyLoading loadingProperties, FilteredLoader owner ) :
lazyLoadedRead( annotation, owner ){
       System.out.println("Lazy Loading");
   }

}

so I'm searching to define a pointcut for any access to a collection of
SerializableObject that have been annotated with @LazyLoading, but I got an
error on the advice: formal unbound in pointcut for loadingProperties.

What am I missing?

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


Back to the top