[Design the new POJO MicroContainer] - Re: DESCRIBE phase - Dependency builders for MC Beans
by adrian@jboss.org
"jaikiran" wrote : While i am trying these things out i'll also check, in the current AS, how many beans need this AOPDependencyBuilder. Just want to reduce the number of MC clients that need to add this additional configuration to override the behaviour.
|
How would you know? The idea of the AOPDependencyBuilder is to make
a bean depend upon an aspect. Where only AOP knows that it applies by
the looking at its configuration (which is user configurable).
Sure there's not much configured by default except the @JMX aspect
but that doesn't mean that users won't configure aspects (including for our beans).
Its the very nature of aspects being cross cutting that makes the AOPDependencyBuilder
required in the first place. i.e. you have to ask aop whether there are any aspects
that need to be applied to this pojo and therefore we need to wait for that aspect to be
deployed (which might in turn depend upon other things) before deploying the pojo.
Otherwise you could just configure the dependency directly on the bean.
Just removing the AOPDependencyBuilder might make it faster. But all it will
mean is that it will fail later when AOP tries to apply an aspect that is not fully deployed yet.
If you really want to exclude the AOPDependencyBuilder processing from a bean then
you should really use one of AOP's existing mechanisms like exclude "org.jboss.ejb3.*"
from having aspects applied to it (that can be configured on the AspectManager).
That way AOP should be able to "short circuit" the aspect dependency checking
for those pojos using the same "filters".
You'd be better off speaking to Kabir about how to optimise/avoid the AOP checking
for what you want than getting Ales to hack things into the MC that are fundamentally wrong.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230481#4230481
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4230481
16 years, 11 months
[Design the new POJO MicroContainer] - Re: DESCRIBE phase - Dependency builders for MC Beans
by kabir.khan@jboss.com
Yes, I think AOPConstructorJoinPoint without the AOPDependencyBuilder is pointless, and vice versa.
It would cause problems if the aspects actually have dependencies
| <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
| name="TxAdvice"
| class="org.acme.aspects.TxAspect"
| <property name="txManager"><inject bean="TxManager"/></property>
| </aop:aspect>
| <aop:bind xmlns:aop="urn:jboss:aop-beans:1.0"
| pointcut="execution(* *->@org.acme.Tx(..))">;
| <advice aspect="TxAdvice" name="invoke"/>
| </aop:bind>
|
but not really of they don't
| <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
| name="Blah"
| class="org.acme.aspects.Blah"
| </aop:aspect>
| <aop:bind xmlns:aop="urn:jboss:aop-beans:1.0"
| pointcut="execution(* *->@org.acme.Blah(..))">;
| <advice aspect="Blah" name="invoke"/>
| </aop:bind>
|
But if you are sure you don't want aop for a set of beans, then both should be turned off
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230478#4230478
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4230478
16 years, 11 months