CamelContext保持重启和关闭

时间:2018-08-15 16:54:46

标签: apache-camel camel-blueprint

我们正在使用JBoss Fuse 6.3。我们的捆绑软件通常具有用于数据库连接和其他项目属性的属性占位符。以下是占位符配置之一:

    <cm:property-placeholder
    id="property-placeholder-databaseconnection"
    persistent-id="com.mycompany.database" update-strategy="reload"/>

我们中的一些人已经体验到,在安装捆绑软件后,骆驼语境会保持启动和关闭状态。以下是日志

    11:24:44,782 | INFO  | rint Extender: 2 | ManagedManagementStrategy        | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | JMX is enabled
11:24:44,786 | INFO  | rint Extender: 2 | DefaultRuntimeEndpointRegistry   | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Runtime endpoint registry is in extended mode gathering usage statistics of all incoming and outgoing endpoints (cache limit: 1000)
11:24:44,795 | INFO  | rint Extender: 2 | BlueprintCamelContext            | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | AllowUseOriginalMessage is enabled. If access to the original message is not needed, then its recommended to turn this option off as it may improve performance.
11:24:44,795 | INFO  | rint Extender: 2 | BlueprintCamelContext            | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
11:24:44,820 | INFO  | rint Extender: 2 | BlueprintCamelContext            | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Route: queuetable-message-router started and consuming from: Endpoint[direct-vm://queuetable-Parentid]
11:24:44,820 | INFO  | rint Extender: 2 | BlueprintCamelContext            | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Total 1 routes, of which 1 are started.
11:24:44,820 | INFO  | rint Extender: 2 | BlueprintCamelContext            | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Apache Camel 2.17.0.redhat-630187 (CamelContext: camelqueuetable) started in 0.076 seconds
11:24:44,825 | INFO  | Thread-3577      | BlueprintCamelContext            | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Apache Camel 2.17.0.redhat-630187 (CamelContext: camelqueuetable) is shutting down
11:24:44,826 | INFO  | Thread-3577      | DefaultShutdownStrategy          | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Starting to graceful shutdown 1 routes (timeout 300 seconds)
11:24:44,827 | INFO  | 9 - ShutdownTask | DefaultShutdownStrategy          | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Route: queuetable-message-router shutdown complete, was consuming from: Endpoint[direct-vm://queuetable-Parentid]
11:24:44,827 | INFO  | Thread-3577      | DefaultShutdownStrategy          | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Graceful shutdown of 1 routes completed in 0 seconds

这种情况经常发生,但并非总是如此。通过搜索网络,有人建议更改属性占位符中的 update-strategy =“ none” 。此更改确实解决了问题。但是,我们确实想为某些财产所有人提供 update-strategy =“ reload” 。此外,我们想知道为什么会这样。

0 个答案:

没有答案