New AOP stuff going on.
bill.burke Feb 5, 2004 8:48 AMAfter a few months of no activity, JBoss AOP development is back in full force. Between working on JBoss 3.2 performance improvements, my daughter being born, and other AOP related political issues related to a certain non-JBoss individual that I'd rather not talk about that delayed development for over 10 weeks, I'm fully back coding full throttle.
So what are we doing within the framework? Here's what I'm doing from my notes if you can make sense of it:
DONE * compiler, add a precompiler so control of ClassLoader is not needed DONE - add sys property for jboss-aop.xml classpath DONE - add -verbose switch DONE - in runtime loader make sure that if CtClass instanceof Advised then do not transform class DONE ant task DONE * Create ways of loading XML in standalone mode so that control of the ClassLoader is not needed DONE * constructor expressions so that we can have per-constructor interceptors, metadata definitions * method expressions so that we can specify parameter expressions in pointcut * Add more metadata to CallerInvocation * Bug: Need to be able to have caller pointcuts from within a constructor This should work: <caller-pointcut callingClass="foo.bar" calledClass=".*"/> * scoping (In original JBoss AOP spec) by able to define the * aspect concept <aspect class="org.jboss.SomeAspect" scope="perInstance"/> <pointcut-ref name="somePointcut"> <aspect class="org.jboss.SomeAspect" advice="blah"/> <interceptor>...</interceptor> </pointcut-ref> Where an Aspect can be any java class and advices are the methods. There will be two types of advice methods A method that takes an invocation object void someMethod(Invocation invocation); and: int someMethodThatIsExactlyLikeInterceptedMethod(String param); * AspectManagerService should have switch to turn off runtime loader * fine grain "prep" <advisable includeMethods="" excludeFields=""/> etc... * metadata models annotations * metadata uses XMLBeans * Metadata pointcut <metadata-pointcut group(required), attr?, class?, instanceof?, methodName?, field?> All other ones can just * Overriding <metadata-pointcut name="JBoss Default Transaction Demarcation" group="Transaction" attr="trans-attr"> <interceptors> <interceptor ...> </interceptors> </metadata-pointcut> <exclude-pointcut pointcut="JBoss Default Transaction Demarcation" instanceof="!..." methodName="..." field="..." constructor="..."/> <include-pointcut pointcut="JBoss DefaultTransaction Demarcation"/> Attributes (instanceof, methodName, field, etc...) are logically ANDed. * instanceof * Control flow <control-flow name=".."> <flow class="..." methodName="..." fieldAccess"/> <flow class="..." methodName="..." fieldAccess"/> <flow class="..." methodName="..." fieldAccess"/> </control-flow> <something-pointcut cflow="name"> <interceptors/> </somethignj-pointcut> <somethign-pointcut> <control-flow> ... </control-flow> </something-pointcut> * Introduction breakout <introduction name="..."> <class-pointcut> <interceptors> <introduction-ref> </class-pointcut> * Better classloader integration (bootclasspath thingy), maybe HotSwap, but not a priority ASPECTS AOM: * Add Tx Exception configuration. What exceptions cause a rollback, which do not? * instnace API should support per method/field additions * Add Dynamic Proxy support for AOP Remoting. All interfaces of remoted class or interfaces you want to be remoted. Also wrap remote exceptions as runtime exceptions. * synchronized aspect to add synchronization to any instance. * AOP Cache should add a synchronization interceptor before preparing object for cache so that we can make sure object doesn't change while we are preparing it.* Attribute compiler (JSR-175 for JDK 1.4) Maybe, maybe not