You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/08/10 16:28:20 UTC
[jira] [Commented] (CAMEL-10233) SpringCamelContext should lazy
load ModelJAXBContextFactory
[ https://issues.apache.org/jira/browse/CAMEL-10233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15415527#comment-15415527 ]
ASF GitHub Bot commented on CAMEL-10233:
----------------------------------------
GitHub user jamesnetherton opened a pull request:
https://github.com/apache/camel/pull/1115
[CAMEL-10233] Lazy load ModelJAXBContextFactory in SpringCamelContext
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jamesnetherton/camel CAMEL-10233
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/1115.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1115
----
commit d06ee9866c4315119eedab01b75b509342c1f848
Author: James Netherton <ja...@gmail.com>
Date: 2016-08-10T16:23:12Z
[CAMEL-10233] Lazy load ModelJAXBContextFactory in SpringCamelContext
----
> SpringCamelContext should lazy load ModelJAXBContextFactory
> -----------------------------------------------------------
>
> Key: CAMEL-10233
> URL: https://issues.apache.org/jira/browse/CAMEL-10233
> Project: Camel
> Issue Type: Improvement
> Components: camel-spring
> Reporter: James Netherton
>
> The SpringCamelContext contains a constructor where it does:
> {code}
> setModelJAXBContextFactory(new SpringModelJAXBContextFactory());
> {code}
> This should ideally be done lazilly (which is how the DefaultCamelContext does things).
> The issue with having this logic in the constructor is that when super() is called, camel will fire the 'context created' event. If a context create event handler happens to set the JAXBContextFactory, it ends up being overwritten later on in the SpringCamelContext constructor.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)