[ 
https://issues.apache.org/jira/browse/CAMEL-10406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xavier Fournet updated CAMEL-10406:
-----------------------------------
    Description: 
When consuming from a vm: endpoint, the camel context of the consumed exchange 
may be the wrong one.
The method org.apache.camel.component.seda.SedaConsumer#prepareExchange is 
expected to set the adequate camel context, but because of the Endpoint caching 
in org.apache.camel.component.vm.VmComponent#ENDPOINTS the first context that 
create the endpoint win. In case the first context is the producer one, the 
route in the consumer may fail when trying to access to some information from 
the context

Repro case available here: 
https://github.com/xfournet/camel/blob/CAMEL-10406/camel-core/src/test/java/org/apache/camel/component/vm/VmShouldUseConsumerContext.java

This is related to CAMEL-6746, reverting this code make this test pass but 
obviously some other vm test failed.

  was:
When consuming from a vm: endpoint, the camel context of the consumed exchange 
may be the wrong one.
The method org.apache.camel.component.seda.SedaConsumer#prepareExchange is 
expected to set the adequate camel context, but because of the Endpoint caching 
in org.apache.camel.component.vm.VmComponent#ENDPOINTS the first context that 
create the endpoint win. In case the first context is the producer one, the 
route in the consumer may fail when trying to access to some information from 
the context



> VM endpoint caching leak the wrong camel context
> ------------------------------------------------
>
>                 Key: CAMEL-10406
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10406
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>            Reporter: Xavier Fournet
>
> When consuming from a vm: endpoint, the camel context of the consumed 
> exchange may be the wrong one.
> The method org.apache.camel.component.seda.SedaConsumer#prepareExchange is 
> expected to set the adequate camel context, but because of the Endpoint 
> caching in org.apache.camel.component.vm.VmComponent#ENDPOINTS the first 
> context that create the endpoint win. In case the first context is the 
> producer one, the route in the consumer may fail when trying to access to 
> some information from the context
> Repro case available here: 
> https://github.com/xfournet/camel/blob/CAMEL-10406/camel-core/src/test/java/org/apache/camel/component/vm/VmShouldUseConsumerContext.java
> This is related to CAMEL-6746, reverting this code make this test pass but 
> obviously some other vm test failed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to