camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAMEL-2381) Partial marshalling and unmarshalling
Date Tue, 19 Jan 2010 16:57:43 GMT

    [ https://issues.apache.org/activemq/browse/CAMEL-2381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56997#action_56997
] 

Claus Ibsen commented on CAMEL-2381:
------------------------------------

You must not use ObjectHelper.loadClass directly
{code}
+        if (partClass != null) {
+            setProperty(dataFormat, "partClass", ObjectHelper.loadClass(partClass));
+        }
{code}

What you need is to obtain classResolver from CamelContext as it can provide you with the
correct one to use. This also works in OSGi environments then.

You may then need to lazy load the class in camel-jaxb when you have a reference to the Exchange
from the marshal / unmarshal methods.

> Partial marshalling and unmarshalling
> -------------------------------------
>
>                 Key: CAMEL-2381
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2381
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jaxb
>    Affects Versions: 2.1.0
>            Reporter: Łukasz Dywicki
>            Assignee: Łukasz Dywicki
>         Attachments: jaxb-partial-support.patch
>
>
> JAXB 2 supports partial (un)marshalling. With current version of camel-jaxb it is not
possible to use this feature.
> Partial unmarshalling
> https://jaxb.dev.java.net/guide/_XmlRootElement_and_unmarshalling.html
> Partial marshalling
> http://weblogs.java.net/blog/kohsuke/archive/2005/10/101_ways_to_mar.html

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


Mime
View raw message