Wolf, Chris (IT) wrote:
static class ServiceCallPointcut extends StaticMethodMatcherPointcut {
public boolean matches(Method m, Class targetClass) {
return (targetClass == this.getClass() &&
m.getName().matches("(add.*)|(delete.*)|(fetch.*)|(login.*)"));
}
}
I'm suspicious of the targetClass == this.getClass() - this is only true
if the targetClass is a ServiceCallPointcut... Did you mean something
like MyServiceImpl.this.getClass()?
As for the "wrong" targetClass issue, if you're only using this advice
with a single instance of MyServiceImpl you could always store the impl
object in a field of the AuthenticationChecker, then you can always get
at the "real" object even if Spring passes a proxy to the before method.
Ian
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK