Some time before I have implemented a simpled AOP functionality using JDK1.3 proxies and integrated it with fortress (I use AOP mainly for declarative transactions at this moment). I did it by subclassing the DefaultContainer and overriding the createObjectFactory method which wraps my AOP object factory around the component factory.
Although the system above works there are some limitations in using standard Proxy such as inability to intercept nested method calls. Recently I was looking into CGLIB and discovered that with this library the limitation with nested method calls can be avoided. The problem is that with CGLIB the proxy is created by instatiating an enhanced subclass of the original class. This means that I need to extend ComponentFactory and to override the newInstance method. It wouldn't be a big problem but a need to copy a large part of the original method in the overrided one.
So my first question would be - is it possible to make an additional protected method like ComponentFactory.createInstance which can be overrided to only replace this specific part ? OTOH I would be interested to here how other people integrate AOP with avalon/fortress. Is it a good idea ? Can the COP and IOC principle be used effectively to eliminate the need for AOP ? One concrete example of AOP functionality is transactions which I find to be much easier to implement using a declarative approach combined with AOP.
Regards, Peter.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
