[
https://issues.apache.org/jira/browse/CAMEL-12833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16627261#comment-16627261
]
ASF GitHub Bot commented on CAMEL-12833:
----------------------------------------
jamesnetherton commented on issue #2532: CAMEL-12833: Provide a method of
customizing Camel CDI context creation
URL: https://github.com/apache/camel/pull/2532#issuecomment-424322204
I addressed some of your simple comments.
In answer to your more general points...
1. The strategy is required to be public. Yes, the extension figures out the
correct ClassLoader, but I've left it up to users to decide what do with it. In
my use case it involves a TCCL switch, and that's not something we want in
every environment. Hence the ClassLoader is basically ignored in the default
strategy. The camel context ClassLoader setting that you saw is only for unit
testing to prove the custom strategy is being invoked.
2. The reason I didn't opt for `CdiCamelConfiguration` is that users would
have to configure it for every application. With a bean, I can automatically
make it available to every application for my
[platform](https://github.com/wildfly-extras/wildfly-camel) use case.
If you think a bean is not the right solution, then I don't see many options
aside from some sort of static configuration, or adding the custom logic I need
to implement directly in the CDI extension. Both are sub-optimal IMO.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Provide a method of customizing Camel CDI context creation
> ----------------------------------------------------------
>
> Key: CAMEL-12833
> URL: https://issues.apache.org/jira/browse/CAMEL-12833
> Project: Camel
> Issue Type: Improvement
> Components: camel-cdi
> Reporter: James Netherton
> Assignee: James Netherton
> Priority: Major
>
> For some platforms it'd be useful if Camel CDI had some way of customizing
> the way in which a {{CamelContext}} was created. E.g for controlling which
> ClassLoader is used during instantiation.
> I propose to introduce a {{ContextCreateStrategy}} which users can provide
> custom instances of in their deployments. The default implementation will do
> {{CamelContext}} creation as per normal.
> Some more background for the motivation here:
> https://github.com/wildfly-extras/wildfly-camel/issues/2497
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)