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

Andrea Cosentino resolved CAMEL-21892.
--------------------------------------
    Resolution: Fixed

> Stopped producer in DefaultProducerCache.lastUsedProducer
> ---------------------------------------------------------
>
>                 Key: CAMEL-21892
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21892
>             Project: Camel
>          Issue Type: Bug
>          Components: came-core
>    Affects Versions: 4.8.3
>            Reporter: Håkan Lantz
>            Assignee: Andrea Cosentino
>            Priority: Minor
>             Fix For: 4.11.0, 4.10.4, 4.8.7
>
>         Attachments: DefaultProducerCache.java, 
> DefaultProducerCacheTest.java, patchfile.txt
>
>
> We have found that the lastUsedProducer field in 
> org.apache.camel.support.cache.DefaultProducerCache may reference a stopped 
> producer that case a java.util.concurrent.RejectedExecutionException if 
> re-used after stop/start of a route where it is used.
> We have found this with a ToDynamicDefinition for a JmsComponent and here is 
> a unit-test that show this: [^DefaultProducerCacheTest.java]
> This can be solved by setting the lastUsedProducer field to null in the 
> DefaultProducerCache.doStop() method as shown here: 
> [^DefaultProducerCache.java]
> We first found this in Apache Camel v4.8.3, however it looks like it's still 
> the same code in v4.10.2.
> Regards,
> Håkan.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to