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

Freeman Fang updated CAMEL-12843:
---------------------------------
    Description: 
We found this problem in Karaf camel command, but think it should also exist in 
other camel command usecases.

In Karaf
{code}
karaf@root()> camel:context-list
 Context        Status              Total #       Failed #     Inflight #   
Uptime         
 -------        ------              -------       --------     ----------   
------         
 camel-1        Started                   0              0              0   
1.366 seconds  
karaf@root()> camel:context-suspend camel-1
karaf@root()> camel:context-list
 Context        Status              Total #       Failed #     Inflight #   
Uptime         
 -------        ------              -------       --------     ----------   
------         
 camel-1        Suspended                 0              0              0   
7.554 seconds  
karaf@root()> camel:context-start camel-1 
karaf@root()> camel:context-list
 Context        Status              Total #       Failed #     Inflight #   
Uptime        
 -------        ------              -------       --------     ----------   
------        
 camel-1        Started                   0              0              0   2 
minutes
{code}
So after start a suspended context, there is still one in context-list. But in 
JMX tree there are two camel-1 context. This mismatch should be addressed. 
Either improve ContextList command or if it's a suspended context, throw a 
RuntimeException and let users resume it other than starting it.

  was:
We found this problem in Karaf camel command, but think it should also exist in 
other camel command usecases.

In Karaf
{code}
karaf@root()> camel:context-list
 Context        Status              Total #       Failed #     Inflight #   
Uptime         
 -------        ------              -------       --------     ----------   
------         
 camel-1        Started                   0              0              0   
1.366 seconds  
karaf@root()> camel:context-suspend camel-1
karaf@root()> camel:context-list
 Context        Status              Total #       Failed #     Inflight #   
Uptime         
 -------        ------              -------       --------     ----------   
------         
 camel-1        Suspended                 0              0              0   
7.554 seconds  
karaf@root()> camel:context-st
camel:context-start                                                    (Start a 
Camel context)
camel:context-stop (Stop a Camel context. It becomes unavailable and can not be 
started again)
karaf@root()> camel:context-start camel-1 
karaf@root()> camel:context-list
 Context        Status              Total #       Failed #     Inflight #   
Uptime        
 -------        ------              -------       --------     ----------   
------        
 camel-1        Started                   0              0              0   2 
minutes
{code}
So after start a suspended context, there is still one in context-list. But in 
JMX tree there are two camel-1 context. This mismatch should be addressed. 
Either improve ContextList command or if it's a suspended context, throw a 
RuntimeException and let users resume it other than starting it.


> CamelContext Start command shouldn't start a Suspended context
> --------------------------------------------------------------
>
>                 Key: CAMEL-12843
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12843
>             Project: Camel
>          Issue Type: Bug
>            Reporter: Freeman Fang
>            Priority: Major
>
> We found this problem in Karaf camel command, but think it should also exist 
> in other camel command usecases.
> In Karaf
> {code}
> karaf@root()> camel:context-list
>  Context        Status              Total #       Failed #     Inflight #   
> Uptime         
>  -------        ------              -------       --------     ----------   
> ------         
>  camel-1        Started                   0              0              0   
> 1.366 seconds  
> karaf@root()> camel:context-suspend camel-1
> karaf@root()> camel:context-list
>  Context        Status              Total #       Failed #     Inflight #   
> Uptime         
>  -------        ------              -------       --------     ----------   
> ------         
>  camel-1        Suspended                 0              0              0   
> 7.554 seconds  
> karaf@root()> camel:context-start camel-1 
> karaf@root()> camel:context-list
>  Context        Status              Total #       Failed #     Inflight #   
> Uptime        
>  -------        ------              -------       --------     ----------   
> ------        
>  camel-1        Started                   0              0              0   2 
> minutes
> {code}
> So after start a suspended context, there is still one in context-list. But 
> in JMX tree there are two camel-1 context. This mismatch should be addressed. 
> Either improve ContextList command or if it's a suspended context, throw a 
> RuntimeException and let users resume it other than starting it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to