0

We are using JBoss Fuse 6.3. Our bundles usually have property placeholders for database connection, and other project properties. The following is one o the placeholder configuration:

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

A few of us have experienced that upon installing a bundle, the camelcontext keep start and shutdown. The following is the log

    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

This happens frequently, but not all the time. By search the web, some people suggested to change the update-strategy="none" in the property placeholder. This change does solve the problem. However, we do want to have update-strategy="reload" for some property holders. Besides, we want to know why this happens.

Chris W
  • 21
  • 1
  • 9
  • 1
    This can happen, if you share property file between multiple bundles. Is it this case? See: https://access.redhat.com/solutions/2938531 – Bedla Aug 15 '18 at 19:22
  • @Bedia, you are right, we are working on a large integration project, which includes multiple bundles. These bundles share the same above mentioned common property file (database connection info and other common properties), and each bundle will have its own bundle specific property file. – Chris W Aug 16 '18 at 11:57
  • If you have multiple bundles connecting to the same database (or multiple databases for that matter) I would suggest that you instead break the database connection into its own bundle. You can then expose that as an OSGi Service which you can import into each of the bundles. That would allow you to only reference the databaseconnection-property file in that one bundle. – Erik Karlstrand Aug 21 '18 at 11:57
  • @noMad17 thanks for the suggestion. I will give it a try sometime later. – Chris W Aug 24 '18 at 12:11

0 Answers0