Hi Marko,

we agreed to not introduce AOP.

can we drop the usage of AOP and only keep the injection part ?

that would also remove the zero args constructor requirement.

On Dec 1, 2009, at 6:57 PM, Marko Strukelj wrote:

Hey,

I've addressed the two issues regarding mc-integration:

1) Separate mc-integration code in its own module, so that container module has no dependencies on mc-kernel artifacts.
2) Add xml file configuration for marking certain components to use mc-interception even though they are not marked as @InterceptMC


There are full instructions for checking out, building, packaging jboss or tomcat for integration tests, and running the integration tests.

The AOP integration has some limitations:

"Because proxy mechanism is used to do AOP, there is a requirement that a class to be AOP-ed needs to have a public or protected zero-args constructor.

Service objects that make up exo-kernel and gatein mostly use constructor based DI, and only have constructors that take some injected parameters. In order to make these eligible for AOP, we would have to make sure they all have a protected zero-args constructor."

Any added noop zero-args constructor (let's call it 'fake constructor') would be there purely for technical reasons (proxy extends service implementation type to keep type compatibility), and will only be invoked during proxy object instantiation - when object state and semantics don't matter. Proxy is a dummy object that delegates everything to the actual service instance. Any other state that happens to be inherited by the proxy instance is ignored, and unused.


"Also, when AOP is activated, field injection doesn't work even if it's turned on. This is again a limitation of proxy mechanism and inability to intercept set-field operations in java."

I'm still doing some code beautification - javadoc, some tests ...

Julien maybe take a look if you can find some additional suggestions about the build or something else.

Cheers,

- marko


_______________________________________________
gatein-dev mailing list
gatein-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/gatein-dev