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

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

You ought to be able to implement {{Service}} and {{CamelContextAware}} on the 
data format to have the CamelContext injected and have start/stop methods 
invoked.
If possible then extend ServiceSupport which has doStart and doStop callbacks 
and is capable of storing the state whether its started or not.

That ought to work for DataFormat as well, as it does work for Processor.

Could you try that?



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

Reply via email to