我们正在使用 JBoss Fuse 6.3。我们的包通常具有用于数据库连接和其他项目属性的属性占位符。以下是占位符配置之一:
<cm:property-placeholder
id="property-placeholder-databaseconnection"
persistent-id="com.mycompany.database" update-strategy="reload"/>
我们中的一些人经历过安装包时,camelcontext 保持启动和关闭。以下是日志
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" 。此外,我们想知道为什么会发生这种情况。