This content has been marked as final.
Show 3 replies
-
1. Re: KernelDeploymentManagedObjectCreator doesn't include all
starksm64 Nov 7, 2008 9:15 PM (in response to alesj)The beanFactories is the only manged property in the KernelDeployment currently, so that is what I used. If its really the BeanMetaData from their getBeans(), then effectively the managed property is the beans.
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? -
2. Re: KernelDeploymentManagedObjectCreator doesn't include all
alesj Nov 8, 2008 4:37 AM (in response to alesj)"scott.stark@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? -
3. Re: KernelDeploymentManagedObjectCreator doesn't include all
starksm64 Nov 8, 2008 9:25 AM (in response to alesj)It does not sound like the default behavior of java annotations, even when the annotation is annotated with Inherited.
Each BeanMetaDataFactory impl will have to declare its properties and have its BeanMetaData impls declared properly as well. We'll have to get some tests in place for this.