[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: DESCRIBE phase - Dependency builders for MC Beans
adrian@jboss.org
do-not-reply at jboss.com
Tue May 12 09:48:16 EDT 2009
"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
More information about the jboss-dev-forums
mailing list