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/03/20 14:45:45 UTC
[jira] Created: (CAMEL-2564) SpringCamelContext - Should react to
ContextStoppedEvent and invoke stop on CamelContext
SpringCamelContext - Should react to ContextStoppedEvent and invoke stop on CamelContext
----------------------------------------------------------------------------------------
Key: CAMEL-2564
URL: https://issues.apache.org/activemq/browse/CAMEL-2564
Project: Apache Camel
Issue Type: Improvement
Components: camel-spring
Affects Versions: 2.2.0, 2.1.0, 2.0.0
Reporter: Claus Ibsen
Fix For: 2.3.0
Attachments: CAMEL-2564.patch
I wonder why we haven't see this before.
*Without patch*
{code}
2010-03-20 14:41:50,325 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Started 1 routes
2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
2010-03-20 14:41:52,723 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
2010-03-20 14:41:52,791 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
{code}
*With patch*
{code}
2010-03-20 14:41:16,278 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
2010-03-20 14:41:18,619 [main ] INFO DefaultCamelContext - Started 1 routes
2010-03-20 14:41:18,620 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
2010-03-20 14:41:18,646 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
2010-03-20 14:41:18,711 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
2010-03-20 14:41:18,718 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext:camel) is shutting down
2010-03-20 14:41:18,719 [main ] INFO DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 10 seconds)
2010-03-20 14:41:18,725 [ - ShutdownTask] INFO DefaultShutdownStrategy - Route: route1 shutdown complete.
2010-03-20 14:41:18,725 [main ] INFO DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
2010-03-20 14:41:18,726 [main ] INFO DefaultInflightRepository - Shutting down with no inflight exchanges.
2010-03-20 14:41:18,730 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is shutdown
{code}
This is a problem when using {{org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext}} to create Spring XML based unit tests which can reuse unit tests from *camel-core*.
OSGi and other environments properly shutdown Camel.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-2564) SpringCamelContext - Should react to
ContextStoppedEvent and invoke stop on CamelContext
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-2564:
-------------------------------
Attachment: (was: CAMEL-2564.patch)
> SpringCamelContext - Should react to ContextStoppedEvent and invoke stop on CamelContext
> ----------------------------------------------------------------------------------------
>
> Key: CAMEL-2564
> URL: https://issues.apache.org/activemq/browse/CAMEL-2564
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-spring
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Assignee: Willem Jiang
> Fix For: 2.3.0
>
> Attachments: CAMEL-2564.patch
>
>
> I wonder why we haven't see this before.
> *Without patch*
> {code}
> 2010-03-20 14:41:50,325 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:52,723 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:52,791 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> {code}
> *With patch*
> {code}
> 2010-03-20 14:41:16,278 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:18,619 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:18,620 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:18,646 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:18,711 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> 2010-03-20 14:41:18,718 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext:camel) is shutting down
> 2010-03-20 14:41:18,719 [main ] INFO DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 10 seconds)
> 2010-03-20 14:41:18,725 [ - ShutdownTask] INFO DefaultShutdownStrategy - Route: route1 shutdown complete.
> 2010-03-20 14:41:18,725 [main ] INFO DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
> 2010-03-20 14:41:18,726 [main ] INFO DefaultInflightRepository - Shutting down with no inflight exchanges.
> 2010-03-20 14:41:18,730 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is shutdown
> {code}
> This is a problem when using {{org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext}} to create Spring XML based unit tests which can reuse unit tests from *camel-core*.
> OSGi and other environments properly shutdown Camel.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-2564) SpringCamelContext - Should react to
ContextStoppedEvent and invoke stop on CamelContext
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-2564:
-------------------------------
Attachment: (was: CAMEL-2564.patch)
> SpringCamelContext - Should react to ContextStoppedEvent and invoke stop on CamelContext
> ----------------------------------------------------------------------------------------
>
> Key: CAMEL-2564
> URL: https://issues.apache.org/activemq/browse/CAMEL-2564
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-spring
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Assignee: Willem Jiang
> Fix For: 2.3.0
>
>
> I wonder why we haven't see this before.
> *Without patch*
> {code}
> 2010-03-20 14:41:50,325 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:52,723 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:52,791 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> {code}
> *With patch*
> {code}
> 2010-03-20 14:41:16,278 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:18,619 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:18,620 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:18,646 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:18,711 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> 2010-03-20 14:41:18,718 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext:camel) is shutting down
> 2010-03-20 14:41:18,719 [main ] INFO DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 10 seconds)
> 2010-03-20 14:41:18,725 [ - ShutdownTask] INFO DefaultShutdownStrategy - Route: route1 shutdown complete.
> 2010-03-20 14:41:18,725 [main ] INFO DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
> 2010-03-20 14:41:18,726 [main ] INFO DefaultInflightRepository - Shutting down with no inflight exchanges.
> 2010-03-20 14:41:18,730 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is shutdown
> {code}
> This is a problem when using {{org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext}} to create Spring XML based unit tests which can reuse unit tests from *camel-core*.
> OSGi and other environments properly shutdown Camel.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2564) SpringCamelContext - Should react to
ContextStoppedEvent and invoke stop on CamelContext
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58368#action_58368 ]
Willem Jiang commented on CAMEL-2564:
-------------------------------------
@Claus,
I can't remember why we don;t react the ContextStoppedEvent from Spring to shutdown Camel.
You can verify the patch by running the OSGiIntegrationSpringTest in camel-itest-osgi module.
I'm OK with this patch and will commit it shortly.
> SpringCamelContext - Should react to ContextStoppedEvent and invoke stop on CamelContext
> ----------------------------------------------------------------------------------------
>
> Key: CAMEL-2564
> URL: https://issues.apache.org/activemq/browse/CAMEL-2564
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-spring
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Assignee: Willem Jiang
> Fix For: 2.3.0
>
> Attachments: CAMEL-2564.txt
>
>
> I wonder why we haven't see this before.
> *Without patch*
> {code}
> 2010-03-20 14:41:50,325 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:52,723 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:52,791 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> {code}
> *With patch*
> {code}
> 2010-03-20 14:41:16,278 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:18,619 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:18,620 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:18,646 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:18,711 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> 2010-03-20 14:41:18,718 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext:camel) is shutting down
> 2010-03-20 14:41:18,719 [main ] INFO DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 10 seconds)
> 2010-03-20 14:41:18,725 [ - ShutdownTask] INFO DefaultShutdownStrategy - Route: route1 shutdown complete.
> 2010-03-20 14:41:18,725 [main ] INFO DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
> 2010-03-20 14:41:18,726 [main ] INFO DefaultInflightRepository - Shutting down with no inflight exchanges.
> 2010-03-20 14:41:18,730 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is shutdown
> {code}
> This is a problem when using {{org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext}} to create Spring XML based unit tests which can reuse unit tests from *camel-core*.
> OSGi and other environments properly shutdown Camel.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-2564) SpringCamelContext - Should react to
ContextStoppedEvent and invoke stop on CamelContext
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-2564:
-------------------------------
Attachment: CAMEL-2564.patch
> SpringCamelContext - Should react to ContextStoppedEvent and invoke stop on CamelContext
> ----------------------------------------------------------------------------------------
>
> Key: CAMEL-2564
> URL: https://issues.apache.org/activemq/browse/CAMEL-2564
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-spring
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Assignee: Willem Jiang
> Fix For: 2.3.0
>
> Attachments: CAMEL-2564.patch
>
>
> I wonder why we haven't see this before.
> *Without patch*
> {code}
> 2010-03-20 14:41:50,325 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:52,723 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:52,791 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> {code}
> *With patch*
> {code}
> 2010-03-20 14:41:16,278 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:18,619 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:18,620 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:18,646 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:18,711 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> 2010-03-20 14:41:18,718 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext:camel) is shutting down
> 2010-03-20 14:41:18,719 [main ] INFO DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 10 seconds)
> 2010-03-20 14:41:18,725 [ - ShutdownTask] INFO DefaultShutdownStrategy - Route: route1 shutdown complete.
> 2010-03-20 14:41:18,725 [main ] INFO DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
> 2010-03-20 14:41:18,726 [main ] INFO DefaultInflightRepository - Shutting down with no inflight exchanges.
> 2010-03-20 14:41:18,730 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is shutdown
> {code}
> This is a problem when using {{org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext}} to create Spring XML based unit tests which can reuse unit tests from *camel-core*.
> OSGi and other environments properly shutdown Camel.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2564) SpringCamelContext - Should react to
ContextStoppedEvent and invoke stop on CamelContext
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58360#action_58360 ]
Claus Ibsen commented on CAMEL-2564:
------------------------------------
You can for example run the test {{SpringAggregateThreadPoolProfileTest}} with INFO logging to console to see the difference.
> SpringCamelContext - Should react to ContextStoppedEvent and invoke stop on CamelContext
> ----------------------------------------------------------------------------------------
>
> Key: CAMEL-2564
> URL: https://issues.apache.org/activemq/browse/CAMEL-2564
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-spring
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Assignee: Willem Jiang
> Fix For: 2.3.0
>
> Attachments: CAMEL-2564.patch
>
>
> I wonder why we haven't see this before.
> *Without patch*
> {code}
> 2010-03-20 14:41:50,325 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:52,723 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:52,791 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> {code}
> *With patch*
> {code}
> 2010-03-20 14:41:16,278 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:18,619 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:18,620 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:18,646 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:18,711 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> 2010-03-20 14:41:18,718 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext:camel) is shutting down
> 2010-03-20 14:41:18,719 [main ] INFO DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 10 seconds)
> 2010-03-20 14:41:18,725 [ - ShutdownTask] INFO DefaultShutdownStrategy - Route: route1 shutdown complete.
> 2010-03-20 14:41:18,725 [main ] INFO DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
> 2010-03-20 14:41:18,726 [main ] INFO DefaultInflightRepository - Shutting down with no inflight exchanges.
> 2010-03-20 14:41:18,730 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is shutdown
> {code}
> This is a problem when using {{org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext}} to create Spring XML based unit tests which can reuse unit tests from *camel-core*.
> OSGi and other environments properly shutdown Camel.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-2564) SpringCamelContext - Should react to
ContextStoppedEvent and invoke stop on CamelContext
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-2564:
-------------------------------
Attachment: CAMEL-2564.patch
> SpringCamelContext - Should react to ContextStoppedEvent and invoke stop on CamelContext
> ----------------------------------------------------------------------------------------
>
> Key: CAMEL-2564
> URL: https://issues.apache.org/activemq/browse/CAMEL-2564
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-spring
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Fix For: 2.3.0
>
> Attachments: CAMEL-2564.patch
>
>
> I wonder why we haven't see this before.
> *Without patch*
> {code}
> 2010-03-20 14:41:50,325 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:52,723 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:52,791 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> {code}
> *With patch*
> {code}
> 2010-03-20 14:41:16,278 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:18,619 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:18,620 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:18,646 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:18,711 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> 2010-03-20 14:41:18,718 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext:camel) is shutting down
> 2010-03-20 14:41:18,719 [main ] INFO DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 10 seconds)
> 2010-03-20 14:41:18,725 [ - ShutdownTask] INFO DefaultShutdownStrategy - Route: route1 shutdown complete.
> 2010-03-20 14:41:18,725 [main ] INFO DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
> 2010-03-20 14:41:18,726 [main ] INFO DefaultInflightRepository - Shutting down with no inflight exchanges.
> 2010-03-20 14:41:18,730 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is shutdown
> {code}
> This is a problem when using {{org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext}} to create Spring XML based unit tests which can reuse unit tests from *camel-core*.
> OSGi and other environments properly shutdown Camel.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CAMEL-2564) SpringCamelContext - Should react to
ContextStoppedEvent and invoke stop on CamelContext
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang resolved CAMEL-2564.
---------------------------------
Resolution: Fixed
Fix Version/s: 1.6.3
Applied patch in trunk and camel 1.x branch with thanks to Claus.
> SpringCamelContext - Should react to ContextStoppedEvent and invoke stop on CamelContext
> ----------------------------------------------------------------------------------------
>
> Key: CAMEL-2564
> URL: https://issues.apache.org/activemq/browse/CAMEL-2564
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-spring
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Assignee: Willem Jiang
> Fix For: 1.6.3, 2.3.0
>
> Attachments: CAMEL-2564.txt
>
>
> I wonder why we haven't see this before.
> *Without patch*
> {code}
> 2010-03-20 14:41:50,325 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:52,723 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:52,791 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> {code}
> *With patch*
> {code}
> 2010-03-20 14:41:16,278 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:18,619 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:18,620 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:18,646 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:18,711 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> 2010-03-20 14:41:18,718 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext:camel) is shutting down
> 2010-03-20 14:41:18,719 [main ] INFO DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 10 seconds)
> 2010-03-20 14:41:18,725 [ - ShutdownTask] INFO DefaultShutdownStrategy - Route: route1 shutdown complete.
> 2010-03-20 14:41:18,725 [main ] INFO DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
> 2010-03-20 14:41:18,726 [main ] INFO DefaultInflightRepository - Shutting down with no inflight exchanges.
> 2010-03-20 14:41:18,730 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is shutdown
> {code}
> This is a problem when using {{org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext}} to create Spring XML based unit tests which can reuse unit tests from *camel-core*.
> OSGi and other environments properly shutdown Camel.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2564) SpringCamelContext - Should react to
ContextStoppedEvent and invoke stop on CamelContext
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58353#action_58353 ]
Claus Ibsen commented on CAMEL-2564:
------------------------------------
Willem can you remember anything about why we don't react to ContextStoppedEvent from Spring to shutdown Camel ?
> SpringCamelContext - Should react to ContextStoppedEvent and invoke stop on CamelContext
> ----------------------------------------------------------------------------------------
>
> Key: CAMEL-2564
> URL: https://issues.apache.org/activemq/browse/CAMEL-2564
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-spring
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Fix For: 2.3.0
>
> Attachments: CAMEL-2564.patch
>
>
> I wonder why we haven't see this before.
> *Without patch*
> {code}
> 2010-03-20 14:41:50,325 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:52,723 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:52,791 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> {code}
> *With patch*
> {code}
> 2010-03-20 14:41:16,278 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:18,619 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:18,620 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:18,646 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:18,711 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> 2010-03-20 14:41:18,718 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext:camel) is shutting down
> 2010-03-20 14:41:18,719 [main ] INFO DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 10 seconds)
> 2010-03-20 14:41:18,725 [ - ShutdownTask] INFO DefaultShutdownStrategy - Route: route1 shutdown complete.
> 2010-03-20 14:41:18,725 [main ] INFO DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
> 2010-03-20 14:41:18,726 [main ] INFO DefaultInflightRepository - Shutting down with no inflight exchanges.
> 2010-03-20 14:41:18,730 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is shutdown
> {code}
> This is a problem when using {{org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext}} to create Spring XML based unit tests which can reuse unit tests from *camel-core*.
> OSGi and other environments properly shutdown Camel.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-2564) SpringCamelContext - Should react to
ContextStoppedEvent and invoke stop on CamelContext
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-2564:
-------------------------------
Attachment: CAMEL-2564.txt
> SpringCamelContext - Should react to ContextStoppedEvent and invoke stop on CamelContext
> ----------------------------------------------------------------------------------------
>
> Key: CAMEL-2564
> URL: https://issues.apache.org/activemq/browse/CAMEL-2564
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-spring
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Assignee: Willem Jiang
> Fix For: 2.3.0
>
> Attachments: CAMEL-2564.txt
>
>
> I wonder why we haven't see this before.
> *Without patch*
> {code}
> 2010-03-20 14:41:50,325 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:52,723 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:52,791 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> {code}
> *With patch*
> {code}
> 2010-03-20 14:41:16,278 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:18,619 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:18,620 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:18,646 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:18,711 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> 2010-03-20 14:41:18,718 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext:camel) is shutting down
> 2010-03-20 14:41:18,719 [main ] INFO DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 10 seconds)
> 2010-03-20 14:41:18,725 [ - ShutdownTask] INFO DefaultShutdownStrategy - Route: route1 shutdown complete.
> 2010-03-20 14:41:18,725 [main ] INFO DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
> 2010-03-20 14:41:18,726 [main ] INFO DefaultInflightRepository - Shutting down with no inflight exchanges.
> 2010-03-20 14:41:18,730 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is shutdown
> {code}
> This is a problem when using {{org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext}} to create Spring XML based unit tests which can reuse unit tests from *camel-core*.
> OSGi and other environments properly shutdown Camel.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CAMEL-2564) SpringCamelContext - Should react to
ContextStoppedEvent and invoke stop on CamelContext
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-2564:
----------------------------------
Assignee: Willem Jiang
Willem can you ensure this patch does not break anything in OSGi environments?
> SpringCamelContext - Should react to ContextStoppedEvent and invoke stop on CamelContext
> ----------------------------------------------------------------------------------------
>
> Key: CAMEL-2564
> URL: https://issues.apache.org/activemq/browse/CAMEL-2564
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-spring
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Assignee: Willem Jiang
> Fix For: 2.3.0
>
> Attachments: CAMEL-2564.patch
>
>
> I wonder why we haven't see this before.
> *Without patch*
> {code}
> 2010-03-20 14:41:50,325 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:51,185 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:52,696 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:52,723 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:52,791 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> {code}
> *With patch*
> {code}
> 2010-03-20 14:41:16,278 [main ] INFO CamelNamespaceHandler - camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is starting
> 2010-03-20 14:41:17,141 [main ] INFO DefaultCamelContext - JMX enabled. Using ManagedManagementStrategy.
> 2010-03-20 14:41:18,619 [main ] INFO DefaultCamelContext - Started 1 routes
> 2010-03-20 14:41:18,620 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) started
> 2010-03-20 14:41:18,646 [main ] INFO MockEndpoint - Asserting: Endpoint[mock://aggregated] is satisfied
> 2010-03-20 14:41:18,711 [ 0 - Aggregator] INFO foo - Exchange[BodyType:String, Body:A+B+C]
> 2010-03-20 14:41:18,718 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext:camel) is shutting down
> 2010-03-20 14:41:18,719 [main ] INFO DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 10 seconds)
> 2010-03-20 14:41:18,725 [ - ShutdownTask] INFO DefaultShutdownStrategy - Route: route1 shutdown complete.
> 2010-03-20 14:41:18,725 [main ] INFO DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
> 2010-03-20 14:41:18,726 [main ] INFO DefaultInflightRepository - Shutting down with no inflight exchanges.
> 2010-03-20 14:41:18,730 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel) is shutdown
> {code}
> This is a problem when using {{org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext}} to create Spring XML based unit tests which can reuse unit tests from *camel-core*.
> OSGi and other environments properly shutdown Camel.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.