You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "ant elder (JIRA)" <de...@tuscany.apache.org> on 2008/10/20 12:28:44 UTC

[jira] Updated: (TUSCANY-2640) Should use package(s) when possible in creating JAXBContext, not set of Classes

     [ https://issues.apache.org/jira/browse/TUSCANY-2640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ant elder updated TUSCANY-2640:
-------------------------------

    Fix Version/s: Java-SCA-Next

> Should use package(s) when possible in creating JAXBContext, not set of Classes
> -------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2640
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2640
>             Project: Tuscany
>          Issue Type: Bug
>            Reporter: Scott Kurz
>             Fix For: Java-SCA-Next
>
>
> The JAXBContextHelper method:
>    createJAXBContext(TransformationContext tContext, boolean source)
> ends up calling
>   JAXBContextCache.getJAXBContext(Set<Class<?>> classes)  
> This latter method, though, will only use the pkg-style JAXBContext.newInstance() if there is only a single Class in the set... otherwise it will use class-style JAXBContext.newInstance().
> It is only the pkg-style, however, which causes the @XmlRegistry (typically 'ObjectFactory') to be registered in the JAXBContext (since it's not like we go add the registry to the list of classes passed into newInstance()).  The end result is that the @XmlElemDecl's in the registry are not registered, and there are a list of global elems with the context doesn't know about, though it could if we changed the context creation.
> My motive for caring here is in looking to support JAXB unmarshalling by global-element....  I'm not sure if I could produce an error with the current code doing unmarshalling by declaredType, so for now I'm arguing for changing this for consistency's sake.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.