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

Raymond Feng reassigned TUSCANY-2640:
-------------------------------------

    Assignee: Raymond Feng

> 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
>            Assignee: Raymond Feng
>             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.

Reply via email to