You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2009/10/27 19:56:59 UTC

[jira] Commented: (CXF-2500) JAXBContextInitializer does not support JAXBRIContext.ANNOTATION_READER property

    [ https://issues.apache.org/jira/browse/CXF-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770605#action_12770605 ] 

Daniel Kulp commented on CXF-2500:
----------------------------------


This is definitely going to require some rework before being applied.   It binds directly to com.sun.xml.bind.v2.model.annotation.RuntimeAnnotationReader which means the jaxb-impl jar becomes completely required.   The JAXBDataBinding would not longer work with the JAXB implementation built into the Java6 jdk.   That's definitely an issue.



> JAXBContextInitializer does not support JAXBRIContext.ANNOTATION_READER property
> --------------------------------------------------------------------------------
>
>                 Key: CXF-2500
>                 URL: https://issues.apache.org/jira/browse/CXF-2500
>             Project: CXF
>          Issue Type: New Feature
>          Components: JAXB Databinding
>    Affects Versions: 2.2.4
>            Reporter: Stefan Fussenegger
>         Attachments: JAXBContextInitializer.java.patch
>
>
> JAXBContextInitializer does not support JAXBRIContext.ANNOTATION_READER property which is used to specify a different RuntimeAnnotationReader. For instance, this property is required for JAXBIntroductions (http://www.jboss.org/community/wiki/JAXBIntroductions) to work. While trying to use JAXBIntroductions, I've noticed that JAXBContextInitializer was ignoring @XmlTransient and therefore included a lot of unused classes - (marshalling and unmarshalling works as expected though)
> Instead of calling (e.g.) clazz.getAnnotation(XmlJavaTypeAdapter.class) directly, runtimeAnnotationReader.getClassAnnotation(clazz, XmlJavaTypeAdapter.class, srcpos) should be used. I'll attach a patch containing yet untested (sorry, but I wasn't able to build from source) changes to JAXBContextInitializer.
> If out-of-the-box support of JAXBRIContext.ANNOTATION_READER isn't possible, I'd really appreciate the possibility to plug in a custom implementation, e.g. using JAXBContextInitializer initializer = newJAXBContextInitializer(serviceInfo, contextClasses) in JAXBDataBinding.

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