camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gennadiy Bukhmatov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-5888) When call removeRouteDefinition the route doesn't removed from collection of route Definitions.
Date Mon, 17 Dec 2012 20:16:13 GMT

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

Gennadiy Bukhmatov updated CAMEL-5888:
--------------------------------------

    Description: 
When I call removeRouteDefinition for DefaultCamelContext, the route doesn't removed from
collection of routes.
   public synchronized void removeRouteDefinition(RouteDefinition routeDefinition) throws
Exception {
        String id = routeDefinition.idOrCreate(nodeIdFactory);
        stopRoute(id);
        removeRoute(id);
    }
it is just remove it from running route service if context is running.
When we do restart context this route started again. 
Workaround for this issue is call  removeRouteDefinitions and wrap single route into collection.

But when I call removeRouteDefinitions - it is process correctly: remove from collections
of definitions and after removed from running route services.
    public synchronized void removeRouteDefinitions(Collection<RouteDefinition> routeDefinitions)
throws Exception {
        this.routeDefinitions.removeAll(routeDefinitions);
        for (RouteDefinition routeDefinition : routeDefinitions) {
            removeRouteDefinition(routeDefinition);
        }
    }

 


  was:
When I call removeRouteDefinition for DefaultCamelContext, the route doesn't removed from
collection of routes.
   public synchronized void removeRouteDefinition(RouteDefinition routeDefinition) throws
Exception {
        String id = routeDefinition.idOrCreate(nodeIdFactory);
        stopRoute(id);
        removeRoute(id);
    }
it is just remove it from running route service if context is running.
But when I call removeRouteDefinitions - it is process correctly: remove from collections
of definitions and after removed from running route services.
    public synchronized void removeRouteDefinitions(Collection<RouteDefinition> routeDefinitions)
throws Exception {
        this.routeDefinitions.removeAll(routeDefinitions);
        for (RouteDefinition routeDefinition : routeDefinitions) {
            removeRouteDefinition(routeDefinition);
        }
    }



        Summary: When call removeRouteDefinition the route doesn't removed from collection
of route Definitions.  (was: When call removeRouteDefinition the route doesn't removed from
collection of removeRouteDefinitions)
    
> When call removeRouteDefinition the route doesn't removed from collection of route Definitions.
> -----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5888
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5888
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.10.2
>            Reporter: Gennadiy Bukhmatov
>
> When I call removeRouteDefinition for DefaultCamelContext, the route doesn't removed
from collection of routes.
>    public synchronized void removeRouteDefinition(RouteDefinition routeDefinition) throws
Exception {
>         String id = routeDefinition.idOrCreate(nodeIdFactory);
>         stopRoute(id);
>         removeRoute(id);
>     }
> it is just remove it from running route service if context is running.
> When we do restart context this route started again. 
> Workaround for this issue is call  removeRouteDefinitions and wrap single route into
collection.
> But when I call removeRouteDefinitions - it is process correctly: remove from collections
of definitions and after removed from running route services.
>     public synchronized void removeRouteDefinitions(Collection<RouteDefinition>
routeDefinitions) throws Exception {
>         this.routeDefinitions.removeAll(routeDefinitions);
>         for (RouteDefinition routeDefinition : routeDefinitions) {
>             removeRouteDefinition(routeDefinition);
>         }
>     }
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message