[aspectwerkz-user] Re-visitng AspectWerkz
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <C95FC75CF92394428A55EA8B2DDC164E8A7561@asc-exch-be-02.ascential.com> |
Hello All I'm re-visiting AW after quite sometime, the last release I used was AW 0.9 but after that the aspect/interceptor strategy changed a little bit and was not accommodating to my requirements. I would like to state my scenario and would be greatly helpful if someone could tell me if it is possible or not and point me in the right direction. I use the term "interceptor" instead of "aspect" (that are self-contained in AW) because in my case the "binding" of an advice to one or more pointcuts should be external or at least easy to accomplish without having to re-deploy the aspect. We are using AOP as a "tool" and not as "coding style" for the purposes of policy enforcement on our EJBs. Our policy enforcement mechanism is expected to allow binding at run-time any number of "interceptors" to one or more "pointcuts" where these pointcuts would basically reflect individual operations on the EJB. Similarly there should be capability to detach these interceptor bindings and swap them for something else. It would be a bonus if there was a capability to compose one or more commonly used interceptors inside a stack and attaching this stack to a pointcut. a) At deployment time of the EJB I would like to pre-compile the classes based on the pointcuts which are one for each of the operations. There may be some or no interceptor binding definitions at this point but in essence "preparing" the target to accommodate interceptors for the future. b) To be able to deploy a new "interceptor" at run-time which means class-loading the code, etc and make it available for attaching and detaching them to already "deployed" pointcuts. c) To be able to swap one or more interceptors at run-time from pointcut binding. This is basically the capability to attach and detach interceptors to and from pointcuts that are essentially EJB operations. And at the time of the service invocation, the effect of interception is realized instantly. d) To be able to define one or more attributes/parameters on an Interceptor that is nothing but ad-hoc name-value pairs and should be visible inside the interceptor code. e) To be able to define one or more attributes/parameters as "meta-data" at the class and method level and there should be a capability to read this meta-data from within the interceptor code assuming it is bound to the right pointcut. f) To be able to "name" interceptors borne out of the same class so that I could create an "Interceptor1(class=com.xyz.Interceptor) and Interceptor2(class=com.xyz.Interceptor) and have different attribute values for each of them to be used for different purposes. I was able to do a good deal of this in AW 0.9 but the strategy considerably changed after that and I switched to JBoss-AOP which allowed me to do all of this. But for various reasons I'm also interested in AW considering there is a lot of interest around it and with AspectJ integration. It wasn't obvious to me as to what I can or cannot do with 2.0. Your analysis and inputs are greatly appreciated. Thanks Rajiv Kadayam