camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Created: (CAMEL-2564) SpringCamelContext - Should react to ContextStoppedEvent and invoke stop on CamelContext
Date Sat, 20 Mar 2010 13:45:45 GMT
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.


Mime
View raw message