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 2010/07/28 16:06:54 UTC

[jira] Issue Comment Edited: (CAMEL-3001) Endpoints are recreated instead or restarted

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

Claus Ibsen edited comment on CAMEL-3001 at 7/28/10 10:05 AM:
--------------------------------------------------------------

I am working on adding a
- {{suspend}}
- {{resume}}

methods to {{CamelContext}}. This allows you to suspend Camel, which suspends/stops all the active routes. This ensure the other stuff is still _warm_ which makes resuming {{CamelContext}} faster as its a matter of resuming/starting the previously suspended routes.

The implication is as with graceful shutdown, the ordering of how this is done between the routes matter. So the logic need to cater for this.

      was (Author: davsclaus):
    I am working on adding a
- {{suspend}}
- {{resume}}
methods to {{CamelContext}}. This allows you to suspend Camel, which suspends/stops all the active routes. This ensure the other stuff is still _warm_ which makes resuming {{CamelContext}} faster as its a matter of resuming/starting the previously suspended routes.

The implication is as with graceful shutdown, the ordering of how this is done between the routes matter. So the logic need to cater for this.
  
> Endpoints are recreated instead or restarted
> --------------------------------------------
>
>                 Key: CAMEL-3001
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3001
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>            Reporter: William Tam
>            Assignee: Claus Ibsen
>             Fix For: 2.5.0
>
>
> The change (r979549) made by CAMEL-2991 causes every single endpoint to be recreated instead of restarted which takes Camel a (quite big) step back.  It is bad for the following reasons:
> 1) recreating services associated could be expensive (the design should not assume recreating the services is cheap).
> 2) states (if any) in Endpoint/Service could not be preserved (stop does not mean destroy after all).   
> 3) it is unnecessary to recreate to the whole shebank and it is an unexpected behavior for the users.  (Users think stop but it is gone.)
> In the code (DefaultCamelContext.doStartCamel()), one can clearly see the original intent of the author (who even bothered to put in a nice comment) is to avoid re-initialization the route definition after stopping the camel context.  (Well, things may change but not necessarily for the better.)
> {code}
>        // To avoid initiating the routeDefinitions after stopping the camel context
>         if (!routeDefinitionInitiated) {
>             startRouteDefinitions(routeDefinitions);
>             routeDefinitionInitiated = true;
>         }
> {code}
> But, the change simply reset the routeDefinitionInitiated flag in doStop() which is the exact opposite of the original intention and routeDefinitionInitiated is unless pretty much.  :-( 

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