|
From: Rod J. <rod...@in...> - 2003-11-08 19:59:36
|
As this is our last opportunity to change the public API significantly--I'd rather we didn't need to at all, but I think there are enhancements we need to make with AOP--we should think about the status of the AOP Alliance AttributeRegistry interface. I was the only person on the AOP Alliance arguing for this interface. I felt that metadata was sufficiently important to AOP that to ensure portability of interceptors we should provide a standard facade API to where they got their metadata from. However, while I think there's still a need for a standard facade API for attributes, I don't think the AOP Alliance is going to provide it. JSR-175 is now a little closer, although still a fair way from being available to real projects. Commons Attributes is now looking plausible and Spring itself will soon provide an attributes API that can sit in front of other attribute implementations. I'm inclined to agree with Bob's suggestion that we should drop the AttributeRegistry from our pointcut signatures. This probably means it should go from the AOP Alliance package as well - Renaud, what's your view on this--not from a Spring perspective but from an AOP Alliance perspective. This shouldn't affect Spring users much as most users are using the TransactionInterceptor which generally uses a TransactionAttributeSource rather than the AttributeRegistry. The forthcoming metadata-driven autoproxying can simply use the Spring metadata API, which can be a facade in front of Commons Attributes/JSR-175 etc. One problem with moving away with an AttributeRegistry concept on MethodInvocation is that we don't want Pointcuts to be dependent on Singleton magic (ie black magic) to get metadata: this should be easily pluggable at runtime. Perhaps a pointcuts interested in metadata could implement a MetadataAware interface and expose an Attributes property. Views on this? Regards, Riod |