On Friday 17 September 2004 15:36, Peter Neubauer wrote:
> Im not quite sure what more the implications/benefits are, but it souded > cool to be able to at least balance the programming logic between OOP and > AOP. > Just some random thoughts. > > Wdyt? We had many discussion with Steve & Niclas this summer concerning AOP and Merlin. The approach was based on facility & ProxyFactory tweak. My personnal opinion is that it should be nice to have AOP inside merlin, but we are not sure to cover all use cases that could benefit using AOP with such approach (at least easily). He is a summary of the brainstorm ;) -------------------------------------------------------------- You/I/we create a Interception Facility, that defines one or more interfaces for interceptors. The interceptor author creates a standard merlin component which exposes the interceptor service. The interceptor declares a dependency on the Interception Facility, and looks it up, and registers itself, possibly with a Configuration node, containing the masks. The Interception Facility scans the model and adds a Proxy Factory where needed. The Proxy Factory + Prxy also needs to handle multiple interceptors at each node, bla bla bla I think the bla bla bla, covers the remaining details. The Proxy will delegate the incoming method to the interceptor over the interceptor interface, that the interceptor must implement in the first place. <interception> <component-path>**</component-path> <component-class>org.apache.avalon.test.capacity.SimpleComponent</component-class> <metod>do*</method> </interception> <component name="abc" class="o.a.a.i.MyInterceptor" > <configuration> <interception> <component-path>**</component-path> <component-class>org.apache.avalon.test.capacity.SimpleComponent</component-class> <metod>do*</method> </interception> </configuration> </component> <component name="abc" class="o.a.a.i.MyInterceptor" > <configuration> <interception> <filter .../> <filter .../> <parameter ...></parameter> ... then on Intercept Filter[] getFilters() Param[] getParameters() 1/ optionnaly we need to get the ProxyFactory using context (or maybe, optionnaly the System.prop) 2/ ProxyFactory should implem registerInterceptor( Interceptor interceptor ); Intercept should declare getFilters & getPareameters and the classical invoke( ... ) -------------------------------------------------------- -- Al --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]