Jul 6th, 2007, 07:14 AM
MethodSecurityInterceptor: BeanNameAutoProxyCreator vs. aop:advisor advice-ref
I have a MethodSecurityInterceptor.
When I invoke it via a BeanNameAutoProxyCreator everything is fine.
When I invoke it via aop:advisor advice-ref="myInterceptor" pointcut="execution (* com.foo.bar.IFoo.*(..))" it is called but an org.acegisecurity.AuthenticationCredentialsNotFoun dException is thrown when I call InterceptorStatusToken token = super.beforeInvocation(mi).
What is the difference between both ways? Why doesn't it work with AOP?