You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2009/12/05 18:04:53 UTC

[jira] Created: (CAMEL-2262) onCompletion DSL - Add option to select whether it should run in current thread or async

onCompletion DSL - Add option to select whether it should run in current thread or async
----------------------------------------------------------------------------------------

                 Key: CAMEL-2262
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2262
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 2.1.0, 2.0.0
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
            Priority: Minor
             Fix For: 2.2.0


Currently onCompletion *always* runs in a async manner as a separate task.

We should add option to offer end user to configure this behavior and either run it
a) sync in current thread
b) async in a new thread from a thread pool

Where b will copy the Exchange and run its _own life_. And a will use existing Exchange and run in current thread, which potentially affects the outcome if it throws an Exception etc.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-2262) onCompletion DSL - Add option to select whether it should run in current thread or async

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-2262:
-------------------------------

    Fix Version/s: 2.4.0
                       (was: 2.2.0)

> onCompletion DSL - Add option to select whether it should run in current thread or async
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2262
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2262
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.0.0, 2.1.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.4.0
>
>
> Currently onCompletion *always* runs in a async manner as a separate task.
> We should add option to offer end user to configure this behavior and either run it
> a) sync in current thread
> b) async in a new thread from a thread pool
> Where b will copy the Exchange and run its _own life_. And a will use existing Exchange and run in current thread, which potentially affects the outcome if it throws an Exception etc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (CAMEL-2262) onCompletion DSL - Add option to select whether it should run in current thread or async

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reopened CAMEL-2262:
--------------------------------


A 2nd thought this may bring a value to have that easy Camel routing doing special stuff when an Exchange failed. And it does that sync

> onCompletion DSL - Add option to select whether it should run in current thread or async
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2262
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2262
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.0.0, 2.1.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> Currently onCompletion *always* runs in a async manner as a separate task.
> We should add option to offer end user to configure this behavior and either run it
> a) sync in current thread
> b) async in a new thread from a thread pool
> Where b will copy the Exchange and run its _own life_. And a will use existing Exchange and run in current thread, which potentially affects the outcome if it throws an Exception etc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-2262) onCompletion DSL - Add option to select whether it should run in current thread or async

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-2262.
--------------------------------

    Resolution: Won't Fix

I have played with this a bit more and it do get a bit to complex in terms of error handling if the original Exchange failed with an exception. And then another exception occurs during onCompletion etc.

And whether or not the Exchange should be able to be changed in the onCompletion, where as in the {{async}} case it should not.

> onCompletion DSL - Add option to select whether it should run in current thread or async
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2262
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2262
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.0.0, 2.1.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.4.0
>
>
> Currently onCompletion *always* runs in a async manner as a separate task.
> We should add option to offer end user to configure this behavior and either run it
> a) sync in current thread
> b) async in a new thread from a thread pool
> Where b will copy the Exchange and run its _own life_. And a will use existing Exchange and run in current thread, which potentially affects the outcome if it throws an Exception etc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-2262) onCompletion DSL - Add option to select whether it should run in current thread or async

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-2262.
--------------------------------

    Resolution: Won't Fix

onCompletion is meant for additional work after the original Exchange has completed

> onCompletion DSL - Add option to select whether it should run in current thread or async
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-2262
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2262
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.0.0, 2.1.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> Currently onCompletion *always* runs in a async manner as a separate task.
> We should add option to offer end user to configure this behavior and either run it
> a) sync in current thread
> b) async in a new thread from a thread pool
> Where b will copy the Exchange and run its _own life_. And a will use existing Exchange and run in current thread, which potentially affects the outcome if it throws an Exception etc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.