[jboss-dev-forums] [Design of POJO Server] - Re: Unifying metadata
scott.stark@jboss.org
do-not-reply at jboss.com
Fri Sep 21 10:32:57 EDT 2007
"adrian at jboss.org" wrote :
| This is how you define it generically
|
| | public class ListElementWildcard
| | {
| | private List<Element> wildcard;
| |
| | public List<Element> getWildcard()
| | {
| | return wildcard;
| | }
| |
| | @XmlAnyElement(lax=true)
| | public void setWildcard(List<Element> wildcard)
| | {
| | this.wildcard = wildcard;
| | }
| |
|
| You can also make it recognise specific types, e.g. we could define
| the known JMSContainerInvoker config, etc. by adding @XmlElements
| and specific types but then you need to make List<Object>
| if you also want it to have raw Elements as well as real types.
|
| The real problem is that it just isn't implemented
| (at least in the version in the JBossXB project)
|
| | @XmlType(name="invoker-proxy-bindingType")
| | public class InvokerProxyBindingMetaData extends NamedMetaDataWithDescriptions
| | {
| | ...
| |
| | /** The proxy factory config */
| | // TODO DOM private Element proxyFactoryConfig;
| |
I had unquoted this section in the merged jbossxb project, and that is what produced the errors seen in the JBXB-109 issue. Even if I change this to:
| @XmlType(name="invoker-proxy-bindingType")
| public class InvokerProxyBindingMetaData extends NamedMetaDataWithDescriptions
| {
| /** The proxy factory config */
| private List<Element> proxyFactoryConfig;
| ...
|
| public List<Element> getProxyFactoryConfig()
| {
| return proxyFactoryConfig;
| }
|
| @XmlAnyElement(lax=true)
| public void setProxyFactoryConfig(List<Element> proxyFactoryConfig)
| {
| this.proxyFactoryConfig = proxyFactoryConfig;
| }
| }
|
I'm seeing the same error, which is happening on an xml fragment that does not even have the proxy-factory-config element:
anonymous wrote :
| Caused by: java.lang.ClassCastException: java.util.ArrayList
| at org.jboss.javaee.metadata.support.MappedAnnotationMetaData.add(MappedAnnotationMetaData.java:39)
| at org.jboss.xb.builder.runtime.CollectionPropertyHandler.handle(CollectionPropertyHandler.java:133)
| ... 40 more
|
|
If you or Alexey can look into the JBXB-109 issue it would help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087261#4087261
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087261
More information about the jboss-dev-forums
mailing list