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-3438) JAXBDataFormatter should using Spring ApplicationContext's classLoader explicitly
Date Sat, 18 Dec 2010 14:56:02 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-3438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972801#action_12972801
] 

Claus Ibsen commented on CAMEL-3438:
------------------------------------

I took a look and DataFormat didn't have the same level as Components in Camel. So I added
support for Service and CamelContextAware callbacks on DataFormat as well.
This allows you much easier to do init logic in the start method. And you have access to CamelContext
as well.

I made a slight change to camel-jaxb to use the classloader of CamelContext with JAXB.
Maybe you can try this out. It may need some other tweaks to run with OSGi, but it ought to
be the same as you's as we grab the classloader which created SpringCamelContext.

trunk: 1050641.

> JAXBDataFormatter should using Spring ApplicationContext's classLoader explicitly
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-3438
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3438
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>            Reporter: xuhongbo
>         Attachments: JaxbDataFormat.java
>
>
> JAXBDataFormatter now using JAXBContext.newInstance(path) to create JAXBContext,
> but this will using Thread's context classLoader.
> this may causing un-expected class or resource not found exceptions;

-- 
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