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

ASF GitHub Bot commented on CAMEL-12833:
----------------------------------------

jamesnetherton commented on a change in pull request #2532: CAMEL-12833: 
Provide a method of customizing Camel CDI context creation
URL: https://github.com/apache/camel/pull/2532#discussion_r220170157
 
 

 ##########
 File path: 
components/camel-cdi/src/main/java/org/apache/camel/cdi/CamelContextProducer.java
 ##########
 @@ -64,7 +66,15 @@
 
     @Override
     public T produce(CreationalContext<T> ctx) {
-        T context = super.produce(ctx);
+        T context;
+
+        if (getDelegate() instanceof ContextCreateStrategyInjectionTarget) {
 
 Review comment:
   This is where my CDI knowledge started to run out...
   
   When a CamelContext is created via a producer field / method, we don't get a 
ContextCreateStrategyInjectionTarget. And I wasn't sure how to create a similar 
thing for producers.

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

Reply via email to