[jboss-dev-forums] [Design of POJO Server] - Re: KernelDeploymentManagedObjectCreator doesn't include all

alesj do-not-reply at jboss.com
Sat Nov 8 04:37:02 EST 2008


"scott.stark at jboss.org" wrote : 
  | So if its changed to a collection of beans (BeanMetaData) this is equivalent to call the deprecated setBeans() method on the KernelDeployment. Why is it deprecated?
  | 
I think this is an old leftover.
It should probably be removed before we did CR. :-(

But as you can see, both setBeans and setBeanFactories, set the same variable: List beanFactories

  |    @SuppressWarnings("unchecked")
  |    public void setBeans(List beans)
  |    {
  |       this.beanFactories = beans;
  |       flushJBossObjectCache();
  |    }
  | 
  |    /**
  |     * Set the bean factories.
  |     * 
  |     * @param beanFactories a List<BeanMetaDataFactory>.
  |     */
  |    @ManagementProperty(managed=true)
  |    @XmlElements
  |    ({
  |       @XmlElement(name="bean", type=AbstractBeanMetaData.class),
  |       @XmlElement(name="beanfactory", type=GenericBeanFactoryMetaData.class),
  |       @XmlElement(name="lazy", type=AbstractLazyMetaData.class)
  |    })
  |    @XmlAnyElement
  |    public void setBeanFactories(List<BeanMetaDataFactory> beanFactories)
  |    {
  |       this.beanFactories = beanFactories;
  | 

So, setBeans != getBeans, in terms of what they handle. 

Dunno how you can really solve this at the MO level then. :-)
Probably each BeanMetaDataFactory impl will have to declare its getBeans as MO property?
Or can this be done on the interface?

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

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



More information about the jboss-dev-forums mailing list