I have some problems regarding the use of java annotations for acegi (from http://up-u.com/?p=183) and MethodSecurityInterceptor together with TransactionProxyFactoryBean.
The problem is as follows; if I have
interface BaseManager{}
class BaseManagerImpl implements BaseManager{}
interface UserManager implements BaseManager {}
class UserManagerImpl extends BaseManagerImpl implements UserManager {}
UserManagerImpl is managed by spring as a proxied bean using TransactionProxyFactoryBean.
Only the Class objects for BaseManager and BaseManagerImpl is presented to the AcegiAnnotationAttributes class.
I have only one manager in my project which is not proxied by a TransactionProxyFactoryBean, and it is the only manager with a Class object proposed to my AcegiAnnotationAttributes implementation correctly. All other are proposed as explained.
Where does this problem lie? Is it a fault in MethodDefinitionAttributes as it doesn't handle that the declaring class of the intercepted method is a proxy, or do I have to set up this case in a special way?
It looks like AbstractMethodDefinitionSource.java:51 does the check if the object in question is a MethodInvocation before checking if it is a JoinPoint. If a call to a TransactionFactoryBean is a JoinPoint, then this is a bug, as an object can both be a MethodInvocation, and a JoinPoint. While the code in AMDS:51 does not take this into acount.
Hope someone can shed some light on this one, it has been bugging me for some time now.
Btw; I use acegi 0.8.2, and springframework 1.2-rc2 (the 1.2 release has not yet propagated to the maven repos).
Regards,
Olve S. Hansen


