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/12/14 11:38:01 UTC

[jira] Created: (CAMEL-3425) CamelContext is started twice when using camel-blueprint

CamelContext is started twice when using camel-blueprint
--------------------------------------------------------

                 Key: CAMEL-3425
                 URL: https://issues.apache.org/jira/browse/CAMEL-3425
             Project: Camel
          Issue Type: Bug
          Components: camel-blueprint
    Affects Versions: 2.6.0
            Reporter: Claus Ibsen
            Assignee: Guillaume Nodet
            Priority: Critical
             Fix For: 2.6.0


For example if you run the {{testRouteWithAllComponents}} test in {{CamelBlueprintTest}} in tests/camel-itest-osgi you will see _a lot_ of logging. But notice
{code}
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) is starting
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) started in 0.144 seconds
{code}

Then blueprint does something
{code}
[Blueprint Extender: 3] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) is starting
[Blueprint Extender: 3] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) started in 0.067 seconds
{code}

And likewise both CamelContext's is shutdown when the test completes. There are logging events for that as well.

Pay attention to the name of the 1st CamelContext {{67-camel-2}}. This is the *correct* name as its based on the bundle id, our end user Camel application is given. This ensures that the CamelContext from his application has a name which is unique and refers to the bundle id as well.

Now if you look at the 2nd CamelContext being started its given another name {{4-camel-5}}. That id is most likely using a shared bundle id with a low number. For example camel-blueprint or camel-core bundle, or something like that. 

In essence camel-blueprint should only create *one* CamelContext and it should use the {{67-camel-2}} as the name of the CamelContext (eg. include the bundle id of the end user application).

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


[jira] Commented: (CAMEL-3425) CamelContext is started twice when using camel-blueprint

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971221#action_12971221 ] 

Claus Ibsen commented on CAMEL-3425:
------------------------------------

If you compare this to a spring-dm test from tests/camel-itest-osgi. For example org.apache.camel.itest.osgi.core.direct.DirectTest 

{code}
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.core.direct.DirectTest - ********************************************************************************
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.core.direct.DirectTest - Testing: (org.apache.camel.itest.osgi.core.direct.DirectTest)
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.core.direct.DirectTest - ********************************************************************************
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.OSGiIntegrationTestSupport - Get the bundleContext is org.eclipse.osgi.framework.internal.core.BundleContextImpl@20d9896e
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.OSGiIntegrationTestSupport - Application installed as bundle id: 49
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 49-camel-2) is starting
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Debugger: DefaultDebugger is enabled on CamelContext: 49-camel-2
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - JMX is disabled. Using DefaultManagementStrategy.
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.osgi.Activator - Found 13 @Converter classes to load
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Route: route1 started and consuming from: Endpoint[direct://start]
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Total 1 routes, of which 1 is started.
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 49-camel-2) started in 0.175 seconds
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.component.mock.MockEndpoint - Asserting: Endpoint[mock://result] is satisfied
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.core.direct.DirectTest - Testing done: org.apache.camel.itest.osgi.core.direct.DirectTest@442f1e75
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext:49-camel-2) is shutting down
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 10 seconds)
[Camel (49-camel-2) thread #0 - ShutdownTask] INFO org.apache.camel.impl.DefaultShutdownStrategy - Route: route1 suspension deferred.
[Camel (49-camel-2) thread #0 - ShutdownTask] INFO org.apache.camel.impl.DefaultShutdownStrategy - Route: route1 preparing to shutdown complete.
[Camel (49-camel-2) thread #0 - ShutdownTask] INFO org.apache.camel.impl.DefaultShutdownStrategy - Route: route1 shutdown complete.
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultInflightRepository - Shutting down with no inflight exchanges.
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Uptime: 0.204 seconds
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 49-camel-2) is shutdown in 0.006 seconds
{code}

As you can see from the log above, CamelContext is only started *once*, and it has been given a name using its bundle id. The end user Camel application was given bundle id 49, which is included in the CamelContext name.

> CamelContext is started twice when using camel-blueprint
> --------------------------------------------------------
>
>                 Key: CAMEL-3425
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3425
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-blueprint
>    Affects Versions: 2.6.0
>            Reporter: Claus Ibsen
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: 2.6.0
>
>
> For example if you run the {{testRouteWithAllComponents}} test in {{CamelBlueprintTest}} in tests/camel-itest-osgi you will see _a lot_ of logging. But notice
> {code}
> [RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) is starting
> [RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) started in 0.144 seconds
> {code}
> Then blueprint does something
> {code}
> [Blueprint Extender: 3] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) is starting
> [Blueprint Extender: 3] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) started in 0.067 seconds
> {code}
> And likewise both CamelContext's is shutdown when the test completes. There are logging events for that as well.
> Pay attention to the name of the 1st CamelContext {{67-camel-2}}. This is the *correct* name as its based on the bundle id, our end user Camel application is given. This ensures that the CamelContext from his application has a name which is unique and refers to the bundle id as well.
> Now if you look at the 2nd CamelContext being started its given another name {{4-camel-5}}. That id is most likely using a shared bundle id with a low number. For example camel-blueprint or camel-core bundle, or something like that. 
> In essence camel-blueprint should only create *one* CamelContext and it should use the {{67-camel-2}} as the name of the CamelContext (eg. include the bundle id of the end user application).

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


[jira] Issue Comment Edited: (CAMEL-3425) CamelContext is started twice when using camel-blueprint

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971221#action_12971221 ] 

Claus Ibsen edited comment on CAMEL-3425 at 12/14/10 5:52 AM:
--------------------------------------------------------------

If you compare this to a spring-dm test from tests/camel-itest-osgi. For example org.apache.camel.itest.osgi.core.direct.DirectTest 

{code}
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.core.direct.DirectTest - ********************************************************************************
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.core.direct.DirectTest - Testing: (org.apache.camel.itest.osgi.core.direct.DirectTest)
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.core.direct.DirectTest - ********************************************************************************
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.OSGiIntegrationTestSupport - Get the bundleContext is org.eclipse.osgi.framework.internal.core.BundleContextImpl@53dafbaf
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.OSGiIntegrationTestSupport - Application installed as bundle id: 49
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.core.osgi.OsgiDefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 49-camel-2) is starting
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.core.osgi.OsgiDefaultCamelContext - Debugger: DefaultDebugger is enabled on CamelContext: 49-camel-2
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.core.osgi.OsgiDefaultCamelContext - JMX is disabled. Using DefaultManagementStrategy.
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.osgi.Activator - Found 13 @Converter classes to load
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.core.osgi.OsgiDefaultCamelContext - Route: route1 started and consuming from: Endpoint[direct://start]
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.core.osgi.OsgiDefaultCamelContext - Total 1 routes, of which 1 is started.
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.core.osgi.OsgiDefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 49-camel-2) started in 0.188 seconds
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.component.mock.MockEndpoint - Asserting: Endpoint[mock://result] is satisfied
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.core.direct.DirectTest - Testing done: org.apache.camel.itest.osgi.core.direct.DirectTest@109ce4a3
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.core.osgi.OsgiDefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext:49-camel-2) is shutting down
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 10 seconds)
[Camel (49-camel-2) thread #0 - ShutdownTask] INFO org.apache.camel.impl.DefaultShutdownStrategy - Route: route1 suspension deferred.
[Camel (49-camel-2) thread #0 - ShutdownTask] INFO org.apache.camel.impl.DefaultShutdownStrategy - Route: route1 preparing to shutdown complete.
[Camel (49-camel-2) thread #0 - ShutdownTask] INFO org.apache.camel.impl.DefaultShutdownStrategy - Route: route1 shutdown complete.
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultInflightRepository - Shutting down with no inflight exchanges.
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.core.osgi.OsgiDefaultCamelContext - Uptime: 0.222 seconds
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.core.osgi.OsgiDefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 49-camel-2) is shutdown in 0.007 seconds
{code}

As you can see from the log above, CamelContext is only started *once*, and it has been given a name using its bundle id. The end user Camel application was given bundle id 49, which is included in the CamelContext name.

edit: I fixed the logger in DefaultCamelContext so its not static anymore, which means you can see the actual classname. So now it shows {{OsgiDefaultCamelContext}} instead of {{DefaultCamelContext}}. 

      was (Author: davsclaus):
    If you compare this to a spring-dm test from tests/camel-itest-osgi. For example org.apache.camel.itest.osgi.core.direct.DirectTest 

{code}
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.core.direct.DirectTest - ********************************************************************************
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.core.direct.DirectTest - Testing: (org.apache.camel.itest.osgi.core.direct.DirectTest)
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.core.direct.DirectTest - ********************************************************************************
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.OSGiIntegrationTestSupport - Get the bundleContext is org.eclipse.osgi.framework.internal.core.BundleContextImpl@20d9896e
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.OSGiIntegrationTestSupport - Application installed as bundle id: 49
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 49-camel-2) is starting
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Debugger: DefaultDebugger is enabled on CamelContext: 49-camel-2
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - JMX is disabled. Using DefaultManagementStrategy.
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.osgi.Activator - Found 13 @Converter classes to load
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Route: route1 started and consuming from: Endpoint[direct://start]
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Total 1 routes, of which 1 is started.
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 49-camel-2) started in 0.175 seconds
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.component.mock.MockEndpoint - Asserting: Endpoint[mock://result] is satisfied
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.itest.osgi.core.direct.DirectTest - Testing done: org.apache.camel.itest.osgi.core.direct.DirectTest@442f1e75
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext:49-camel-2) is shutting down
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 10 seconds)
[Camel (49-camel-2) thread #0 - ShutdownTask] INFO org.apache.camel.impl.DefaultShutdownStrategy - Route: route1 suspension deferred.
[Camel (49-camel-2) thread #0 - ShutdownTask] INFO org.apache.camel.impl.DefaultShutdownStrategy - Route: route1 preparing to shutdown complete.
[Camel (49-camel-2) thread #0 - ShutdownTask] INFO org.apache.camel.impl.DefaultShutdownStrategy - Route: route1 shutdown complete.
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultInflightRepository - Shutting down with no inflight exchanges.
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Uptime: 0.204 seconds
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 49-camel-2) is shutdown in 0.006 seconds
{code}

As you can see from the log above, CamelContext is only started *once*, and it has been given a name using its bundle id. The end user Camel application was given bundle id 49, which is included in the CamelContext name.
  
> CamelContext is started twice when using camel-blueprint
> --------------------------------------------------------
>
>                 Key: CAMEL-3425
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3425
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-blueprint
>    Affects Versions: 2.6.0
>            Reporter: Claus Ibsen
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: 2.6.0
>
>
> For example if you run the {{testRouteWithAllComponents}} test in {{CamelBlueprintTest}} in tests/camel-itest-osgi you will see _a lot_ of logging. But notice
> {code}
> [RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) is starting
> [RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) started in 0.144 seconds
> {code}
> Then blueprint does something
> {code}
> [Blueprint Extender: 3] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) is starting
> [Blueprint Extender: 3] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) started in 0.067 seconds
> {code}
> And likewise both CamelContext's is shutdown when the test completes. There are logging events for that as well.
> Pay attention to the name of the 1st CamelContext {{67-camel-2}}. This is the *correct* name as its based on the bundle id, our end user Camel application is given. This ensures that the CamelContext from his application has a name which is unique and refers to the bundle id as well.
> Now if you look at the 2nd CamelContext being started its given another name {{4-camel-5}}. That id is most likely using a shared bundle id with a low number. For example camel-blueprint or camel-core bundle, or something like that. 
> In essence camel-blueprint should only create *one* CamelContext and it should use the {{67-camel-2}} as the name of the CamelContext (eg. include the bundle id of the end user application).

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


[jira] Updated: (CAMEL-3425) CamelContext is started twice when using camel-blueprint

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

Claus Ibsen updated CAMEL-3425:
-------------------------------

    Description: 
For example if you run the {{testRouteWithAllComponents}} test in {{CamelBlueprintTest}} in tests/camel-itest-osgi you will see _a lot_ of logging. But notice
{code}
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.core.osgi.OsgiDefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) is starting
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.core.osgi.OsgiDefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) started in 0.147 seconds
{code}

Then blueprint does something
{code}
[Blueprint Extender: 3] INFO org.apache.camel.blueprint.BlueprintCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) is starting
[Blueprint Extender: 3] INFO org.apache.camel.blueprint.BlueprintCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) started in 0.071 seconds
{code}

And likewise both CamelContext's is shutdown when the test completes. There are logging events for that as well.

Pay attention to the name of the 1st CamelContext {{67-camel-2}}. This is the *correct* name as its based on the bundle id, our end user Camel application is given. This ensures that the CamelContext from his application has a name which is unique and refers to the bundle id as well.

Now if you look at the 2nd CamelContext being started its given another name {{4-camel-5}}. That id is most likely using a shared bundle id with a low number. For example camel-blueprint or camel-core bundle, or something like that. 

In essence camel-blueprint should only create *one* CamelContext and it should use the {{67-camel-2}} as the name of the CamelContext (eg. include the bundle id of the end user application).

  was:
For example if you run the {{testRouteWithAllComponents}} test in {{CamelBlueprintTest}} in tests/camel-itest-osgi you will see _a lot_ of logging. But notice
{code}
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) is starting
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) started in 0.144 seconds
{code}

Then blueprint does something
{code}
[Blueprint Extender: 3] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) is starting
[Blueprint Extender: 3] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) started in 0.067 seconds
{code}

And likewise both CamelContext's is shutdown when the test completes. There are logging events for that as well.

Pay attention to the name of the 1st CamelContext {{67-camel-2}}. This is the *correct* name as its based on the bundle id, our end user Camel application is given. This ensures that the CamelContext from his application has a name which is unique and refers to the bundle id as well.

Now if you look at the 2nd CamelContext being started its given another name {{4-camel-5}}. That id is most likely using a shared bundle id with a low number. For example camel-blueprint or camel-core bundle, or something like that. 

In essence camel-blueprint should only create *one* CamelContext and it should use the {{67-camel-2}} as the name of the CamelContext (eg. include the bundle id of the end user application).


> CamelContext is started twice when using camel-blueprint
> --------------------------------------------------------
>
>                 Key: CAMEL-3425
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3425
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-blueprint
>    Affects Versions: 2.6.0
>            Reporter: Claus Ibsen
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: 2.6.0
>
>
> For example if you run the {{testRouteWithAllComponents}} test in {{CamelBlueprintTest}} in tests/camel-itest-osgi you will see _a lot_ of logging. But notice
> {code}
> [RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.core.osgi.OsgiDefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) is starting
> [RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.core.osgi.OsgiDefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) started in 0.147 seconds
> {code}
> Then blueprint does something
> {code}
> [Blueprint Extender: 3] INFO org.apache.camel.blueprint.BlueprintCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) is starting
> [Blueprint Extender: 3] INFO org.apache.camel.blueprint.BlueprintCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) started in 0.071 seconds
> {code}
> And likewise both CamelContext's is shutdown when the test completes. There are logging events for that as well.
> Pay attention to the name of the 1st CamelContext {{67-camel-2}}. This is the *correct* name as its based on the bundle id, our end user Camel application is given. This ensures that the CamelContext from his application has a name which is unique and refers to the bundle id as well.
> Now if you look at the 2nd CamelContext being started its given another name {{4-camel-5}}. That id is most likely using a shared bundle id with a low number. For example camel-blueprint or camel-core bundle, or something like that. 
> In essence camel-blueprint should only create *one* CamelContext and it should use the {{67-camel-2}} as the name of the CamelContext (eg. include the bundle id of the end user application).

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


[jira] Resolved: (CAMEL-3425) CamelContext is started twice when using camel-blueprint

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

Guillaume Nodet resolved CAMEL-3425.
------------------------------------

    Resolution: Fixed

Committing to https://svn.apache.org/repos/asf/camel/trunk ...
	M	tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/AbstractIntegrationTest.java
Committed r1050422


> CamelContext is started twice when using camel-blueprint
> --------------------------------------------------------
>
>                 Key: CAMEL-3425
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3425
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-blueprint
>    Affects Versions: 2.6.0
>            Reporter: Claus Ibsen
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: 2.6.0
>
>
> For example if you run the {{testRouteWithAllComponents}} test in {{CamelBlueprintTest}} in tests/camel-itest-osgi you will see _a lot_ of logging. But notice
> {code}
> [RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.core.osgi.OsgiDefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) is starting
> [RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.core.osgi.OsgiDefaultCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) started in 0.147 seconds
> {code}
> Then blueprint does something
> {code}
> [Blueprint Extender: 3] INFO org.apache.camel.blueprint.BlueprintCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) is starting
> [Blueprint Extender: 3] INFO org.apache.camel.blueprint.BlueprintCamelContext - Apache Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) started in 0.071 seconds
> {code}
> And likewise both CamelContext's is shutdown when the test completes. There are logging events for that as well.
> Pay attention to the name of the 1st CamelContext {{67-camel-2}}. This is the *correct* name as its based on the bundle id, our end user Camel application is given. This ensures that the CamelContext from his application has a name which is unique and refers to the bundle id as well.
> Now if you look at the 2nd CamelContext being started its given another name {{4-camel-5}}. That id is most likely using a shared bundle id with a low number. For example camel-blueprint or camel-core bundle, or something like that. 
> In essence camel-blueprint should only create *one* CamelContext and it should use the {{67-camel-2}} as the name of the CamelContext (eg. include the bundle id of the end user application).

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