[jboss-dev-forums] [Design of JBossCache] - Re: Injection of MBeanServer

alesj do-not-reply at jboss.com
Mon Nov 6 01:58:25 EST 2006


You are missing a 'Repository' bean in your beans definitions.

As Scott said -> aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/JMXDecoratedTestCase.xml.


  |    <bean name="Repository" class="org.jboss.aop.microcontainer.integration.AOPKernelRepository">
  |       <constructor factoryClass="org.jboss.aop.microcontainer.integration.AOPKernelRepository" factoryMethod="instance"/>
  |    </bean>
  | 
  | 
  |    private MetaDataContext getMetaDataContext(KernelControllerContext context)
  |    {
  |       //TODO: Hardcoding this doesn't feel right...
  |       ControllerContext repCtx = context.getController().getContext("Repository", ControllerState.INSTALLED);
  | 
  |       if (repCtx == null)
  |       {
  |          log.warn("You have defined annotations for bean '" + context.getName() + "', but no KernelRepository has been installed under the name 'Repository'");
  |          return null;
  |       }
  | 
  |       KernelRepository repository = (KernelRepository)repCtx.getTarget();
  |       MetaDataContextFactory metaFactory = context.getBeanInfo().getMetaDataContextFactory();
  |       MetaDataContext metaCtx = metaFactory.getMetaDataContext(repository, context.getName());
  | 
  |       context.setMetaDataContext(metaCtx);
  | 
  |       return metaCtx;
  |    }
  | 

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

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



More information about the jboss-dev-forums mailing list