You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2014/03/01 07:57:20 UTC

[jira] [Resolved] (CAMEL-7259) ProducerTemplate is not aligned with the lifecycle of CamelContext and therefore it's possible to have a Producer that's never shutdown correctly.

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

Claus Ibsen resolved CAMEL-7259.
--------------------------------

       Resolution: Cannot Reproduce
    Fix Version/s: 2.13.0
         Assignee: Claus Ibsen

> ProducerTemplate is not aligned with the lifecycle of CamelContext and therefore it's possible to have a Producer that's never shutdown correctly.
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-7259
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7259
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.12.3
>            Reporter: Aaron Whiteside
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.13.0
>
>
> ProducerTemplate is not aligned with the lifecycle of CamelContext and therefore it's possible to have a Producer that's never shutdown correctly.
> {code}
>         context.start();
>         ProducerTemplate template = context.createProducerTemplate();
>         template.sendBody("test://test", "Hello");
>         context.stop();
> {code}
> If I never call template.stop() the Producer for the test component (or indeed any other component in it's place) will never receive a call to doStop. But the Endpoint that the Producer is associated with will be stopped.. which is a weird situation/state to be in..?
> context.stop() should cleanup any and all Producers, even those created by a ProducerTemplate.. after such time a ProducerTemplate should become invalid and perhaps throw an exception that the camel context has been shutdown?



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)