I tried reusing the mc beans PropertyMetaData/AbstractPropertyMetaData in a custom bean
factory model I'm working on
| @JBossXmlSchema(namespace="urn:jboss:proxied-mbean:1.0",
elementFormDefault=XmlNsForm.QUALIFIED, replacePropertyRefs=true)
| @XmlRootElement(name="proxied-mbeans")
| @XmlType(name="proxiedMBeanType")
| public class ProxiedMBeanMetaData implements Serializable, BeanMetaDataFactory
| {
| private static final long serialVersionUID = 1;
| private static Logger log = Logger.getLogger(ProxiedMBeanMetaData.class);
|
| private List<MBeanProxyMetaData> proxies;
| private List<String> depends = new ArrayList<String>();
| private MBeanServer server;
| ...
|
| @XmlType(name="proxy")
| public class MBeanProxyMetaData
| {
| ...
| @XmlElement(name="property", type=AbstractPropertyMetaData.class)
| public List<PropertyMetaData> getProperties()
| {
| return properties;
| }
| public void setProperties(List<PropertyMetaData> properties)
| {
| this.properties = properties;
| }
|
but when I parse a fragment in a jboss-beans.xml like:
| <proxied-mbeans xmlns="urn:jboss:proxied-mbean:1.0">
| <depend>WebServer</depend>
| <proxy>
|
<delegate-class>org.jboss.web.tomcat.service.management.ConnectorBean</delegate-class>
|
<target-name>jboss.web:type=GlobalRequestProcessor,*</target-name>
|
<target-interface>org.jboss.web.tomcat.service.management.IConnector</target-interface>
|
<annotation>@org.jboss.managed.api.annotation.ManagementObject(componentType=(a)org.jboss.managed.api.annotation.ManagementComponent(type
= "MBean", subtype =
"Web:GlobalRequestProcessor"),isRuntime=true)</annotation>
| </proxy>
| <proxy>
|
<delegate-class>org.jboss.web.tomcat.service.management.Host</delegate-class>
| <target-name>jboss.web:host=localhost,type=Host</target-name>
|
<target-interface>org.jboss.web.tomcat.service.management.IHost</target-interface>
|
<annotation>@org.jboss.managed.api.annotation.ManagementObject(name="jboss.web:host=localhost,type=Host",
componentType=(a)org.jboss.managed.api.annotation.ManagementComponent(type =
"MBean", subtype = "Web:Host"),isRuntime=true)</annotation>
| <property
name="mbeanNameAsString">jboss.web:host=localhost,type=Host</property>
| </proxy>
| </proxied-mbeans>
|
the following exception occurs that I don't understand:
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: The type of
the attribute search must be simple or complex with a value adapter:
org.jboss.xb.binding.sunday.unmarshalling.TypeBinding@809011[null]
| at org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData.search
| at org.jboss.beans.metadata.plugins.AbstractClassLoaderMetaData.classLoader
| at org.jboss.beans.metadata.plugins.AbstractBeanMetaData.classLoader
| at org.jboss.beans.metadata.plugins.AbstractPropertyMetaData.value
| at org.jboss.system.metadata.MBeanProxyMetaData.properties
| at org.jboss.system.metadata.ProxiedMBeanMetaData.proxies
| at org.jboss.system.metadata.ProxiedMBeanMetaData
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
| at
org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:199)
| at
org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:170)
| at
org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:132)
| at
org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:118)
| at
org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)
| at
org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:239)
|
I don't see how the AbstractPropertyMetaData.value property relates to
AbstractBeanMetaData.classLoader?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222484#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...