[jboss-dev-forums] [Design of JBossXB] - Re: JBossXB-2.0.0.CR5

alex.loubyansky@jboss.com do-not-reply at jboss.com
Tue Sep 25 08:42:01 EDT 2007


The following collection bindings are wrong, so I am commenting them. They started to cause errors after Scott's fix.
Index: src/test/java/org/jboss/ejb/metadata/spec/MethodPermissionMetaData.java
  | ===================================================================
  | --- src/test/java/org/jboss/ejb/metadata/spec/MethodPermissionMetaData.java     (revision 2575)
  | +++ src/test/java/org/jboss/ejb/metadata/spec/MethodPermissionMetaData.java     (working copy)
  | @@ -103,7 +103,7 @@
  |      *
  |      * @param roles the roles.
  |      */
  | -   @XmlElement(name="role-name", type=NonNullLinkedHashSet.class)
  | +   @XmlElement(name="role-name"/*, type=NonNullLinkedHashSet.class*/)
  |     public void setRoles(Set<String> roles)
  |     {
  |        this.roles = roles;
  | Index: src/test/java/org/jboss/javaee/metadata/spec/ResourceInjectionMetaData.java
  | ===================================================================
  | --- src/test/java/org/jboss/javaee/metadata/spec/ResourceInjectionMetaData.java (revision 2575)
  | +++ src/test/java/org/jboss/javaee/metadata/spec/ResourceInjectionMetaData.java (working copy)
  | @@ -122,7 +122,7 @@
  |      * @throws IllegalArgumentException for a null injectionTargets
  |      */
  |     //@SchemaProperty(name="injection-target", impl=NonNullLinkedHashSet.class, mandatory=false)
  | -   @XmlElement(name="injection-target", type=NonNullLinkedHashSet.class, required=false)
  | +   @XmlElement(name="injection-target", /*type=NonNullLinkedHashSet.class,*/ required=false)
  |     public void setInjectionTargets(Set<ResourceInjectionTargetMetaData> injectionTargets)
  |     {
  |        if (injectionTargets == null)

It seems like there is no way to say which Collection impl we want to use with the standard JAXB annotations. The spec says:
"jaxb2.0" wrote : If the property or field type is a parametric collection type, then
  | @XmlElement.type() must be DEFAULT.class or
  | collectionitem.class (since the type of the collection is already
  | known).

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

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



More information about the jboss-dev-forums mailing list