[jboss-dev-forums] [Design the new POJO MicroContainer] - Registering a bean as an aspect in the bootstrap

scott.stark@jboss.org do-not-reply at jboss.com
Fri Jan 26 03:45:19 EST 2007


I'm not able to register an aspect using the aop:lifecycle-configure mechanism:

  |    <aop:lifecycle-configure xmlns:aop="urn:jboss:aop-beans:1.0"
  |       name="Deployers"
  |       class="org.jboss.profileservice.aop.DeployerAspects"
  |       classes="org.jboss.deployers.spi.deployer.Deployer"
  |       manager-bean="AspectManager"
  |       manager-property="aspectManager"
  |       pointcut="execution(* $instanceof{org.jboss.deployers.spi.deployer.Deployer}->prepareDeploy(..))">
  |    </aop:lifecycle-configure>
  | 

I have to use the AspectManager ctor config to get this aspect to be applied to the deployers:

  | ...
  |    <aspect name="deployers" class="org.jboss.profileservice.aop.DeployerAspects"/>
  |    <bind pointcut="execution(* $instanceof{org.jboss.deployers.spi.deployer.Deployer}->commitDeploy(..))">
  |       <advice name="commitDeploy" aspect="deployers"/>							         
  |    </bind>
  | 

Is there a way to have an aspect as a bean that can be manipulated as an mc bean that will still be applied to the beans being loaded?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4006696#4006696

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4006696



More information about the jboss-dev-forums mailing list