[
https://issues.apache.org/jira/browse/CAMEL-9678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15607913#comment-15607913
]
ASF GitHub Bot commented on CAMEL-9678:
---------------------------------------
GitHub user igarashitm opened a pull request:
https://github.com/apache/camel/pull/1224
CAMEL-9678 camel-undertow - Keep restarting server when add/remove ro…
…utes
Refactored camel-undertow consumer to enable hot swapping individual
handlers which correspond to each consumers without restarting undertow server.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/igarashitm/camel CAMEL-9678
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/1224.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1224
----
commit 320150c6c8d05a3ccfe879d30a47b191ab73c2f3
Author: Tomohisa Igarashi <[email protected]>
Date: 2016-10-26T08:17:13Z
CAMEL-9678 camel-undertow - Keep restarting server when add/remove routes
Refactored camel-undertow consumer to enable hot swapping individual
handlers which correspond to each consumers without restarting undertow server.
----
> camel-undertow - Keep restarting server when add/remove routes
> --------------------------------------------------------------
>
> Key: CAMEL-9678
> URL: https://issues.apache.org/jira/browse/CAMEL-9678
> Project: Camel
> Issue Type: Improvement
> Components: camel-undertow
> Affects Versions: 2.17.0
> Reporter: Claus Ibsen
> Assignee: Tomohisa Igarashi
> Priority: Minor
>
> When having 4 routes, using rest-dsl, the notice the start server logging on
> both start/shutdown.
> {code}
> 2016-03-08 09:40:18,659 [rderMain.main()] INFO UndertowRegistry
> - Adding consumer to consumerRegistry: http://0.0.0.0:8080/orders/%7Bid%7D
> 2016-03-08 09:40:18,661 [rderMain.main()] INFO UndertowEndpoint
> - Starting server on port: 8080
> 2016-03-08 09:40:18,712 [rderMain.main()] INFO xnio
> - XNIO version 3.3.4.Final
> 2016-03-08 09:40:18,729 [rderMain.main()] INFO nio
> - XNIO NIO Implementation Version 3.3.4.Final
> 2016-03-08 09:40:18,833 [rderMain.main()] INFO DefaultCamelContext
> - Route: route1 started and consuming from:
> Endpoint[http://0.0.0.0:8080/orders/%7Bid%7D?httpMethodRestrict=GET]
> 2016-03-08 09:40:18,835 [rderMain.main()] INFO UndertowRegistry
> - Adding consumer to consumerRegistry: http://0.0.0.0:8080/orders
> 2016-03-08 09:40:18,835 [rderMain.main()] INFO UndertowEndpoint
> - Starting server on port: 8080
> 2016-03-08 09:40:18,842 [rderMain.main()] INFO DefaultCamelContext
> - Route: route2 started and consuming from:
> Endpoint[http://0.0.0.0:8080/orders?httpMethodRestrict=POST]
> 2016-03-08 09:40:18,844 [rderMain.main()] INFO UndertowRegistry
> - Adding consumer to consumerRegistry: http://0.0.0.0:8080/orders
> 2016-03-08 09:40:18,844 [rderMain.main()] INFO UndertowEndpoint
> - Starting server on port: 8080
> 2016-03-08 09:40:18,848 [rderMain.main()] INFO DefaultCamelContext
> - Route: route3 started and consuming from:
> Endpoint[http://0.0.0.0:8080/orders?httpMethodRestrict=PUT]
> 2016-03-08 09:40:18,849 [rderMain.main()] INFO UndertowRegistry
> - Adding consumer to consumerRegistry: http://0.0.0.0:8080/orders/%7Bid%7D
> 2016-03-08 09:40:18,849 [rderMain.main()] INFO UndertowEndpoint
> - Starting server on port: 8080
> 2016-03-08 09:40:18,854 [rderMain.main()] INFO DefaultCamelContext
> - Route: route4 started and consuming from:
> Endpoint[http://0.0.0.0:8080/orders/%7Bid%7D?httpMethodRestrict=DELETE]
> 2016-03-08 09:40:18,854 [rderMain.main()] INFO DefaultCamelContext
> - Total 4 routes, of which 4 are started.
> 2016-03-08 09:40:18,855 [rderMain.main()] INFO DefaultCamelContext
> - Apache Camel 2.17-SNAPSHOT (CamelContext: camel-1) started in 1.236 seconds
> ^C2016-03-08 09:40:58,098 [Thread-1 ] INFO
> MainSupport$HangupInterceptor - Received hang up - stopping the main
> instance.
> 2016-03-08 09:40:58,099 [Thread-1 ] INFO DefaultCamelContext
> - Apache Camel 2.17-SNAPSHOT (CamelContext: camel-1) is shutting down
> 2016-03-08 09:40:58,100 [Thread-1 ] INFO DefaultShutdownStrategy
> - Starting to graceful shutdown 4 routes (timeout 300 seconds)
> 2016-03-08 09:40:58,105 [ - ShutdownTask] INFO UndertowEndpoint
> - Starting server on port: 8080
> 2016-03-08 09:40:58,109 [ - ShutdownTask] INFO DefaultShutdownStrategy
> - Route: route4 shutdown complete, was consuming from:
> Endpoint[rest://delete:/orders:%7Bid%7D?componentName=undertow&routeId=route4]
> 2016-03-08 09:40:58,109 [ - ShutdownTask] INFO UndertowEndpoint
> - Starting server on port: 8080
> 2016-03-08 09:40:58,113 [ - ShutdownTask] INFO DefaultShutdownStrategy
> - Route: route3 shutdown complete, was consuming from:
> Endpoint[rest://put:/orders?componentName=undertow&inType=camelinaction.Order&routeId=route3]
> 2016-03-08 09:40:58,113 [ - ShutdownTask] INFO UndertowEndpoint
> - Starting server on port: 8080
> 2016-03-08 09:40:58,116 [ - ShutdownTask] INFO DefaultShutdownStrategy
> - Route: route2 shutdown complete, was consuming from:
> Endpoint[rest://post:/orders?componentName=undertow&inType=camelinaction.Order&routeId=route2]
> 2016-03-08 09:40:58,117 [ - ShutdownTask] INFO DefaultShutdownStrategy
> - Route: route1 shutdown complete, was consuming from:
> Endpoint[rest://get:/orders:%7Bid%7D?componentName=undertow&outType=camelinaction.Order&routeId=route1]
> 2016-03-08 09:40:58,117 [Thread-1 ] INFO DefaultShutdownStrategy
> - Graceful shutdown of 4 routes completed in 0 seconds
> 2016-03-08 09:40:58,123 [Thread-1 ] INFO MainLifecycleStrategy
> - CamelContext: camel-1 has been shutdown, triggering shutdown of the JVM.
> {code}
> We should make this better.
> To reproduce run the example at
> https://github.com/camelinaction/camelinaction2/tree/master/chapter10/undertow-rest-xml-json
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)