camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bengt Rodehav <>
Subject managed-service-factory but no callback on configuration changes
Date Mon, 15 Mar 2010 18:46:16 GMT
Hello everyone,

I'm trying to use Spring-DM's support for managed-service-factory. My
artifact (deployed in Karaf 1.4) contains the following XML snippet in

<osgix:managed-service-factory id="test-container"
    update-strategy="bean-managed" update-method="configurationUpdate">

I then drop a configuration file called
"se.digia.connect.routes.test.container-first.cfg" in the etc folder. This
causes a service containing the correct configuration to be started and
registered. Via Felix WebConsole I can see the configuration and it's the
correct one. When I delete the configuration file from the "etc" folder, the
service is stopped. It all works.

However, my bean (an instance
of se.digia.connect.routes.test.container.impl.TestContainer) never gets a
callback. I expected the "configurationUpdate()" method of the TestContainer
class to be called whenever the configuration changes. My callback method
has the following signature:

  public void configurationUpdate(Map<String, ?> theProperties) throws

When I use a "managed-properties" instead of "managed-service-factory" I do
get the callback. The following works perfectly:

  <bean id="testRoute" class="se.digia.connect.routes.test.impl.TestRoute">
    <osgix:managed-properties persistent-id="se.digia.connect.routes.test"
      update-method="configurationUpdate" />

  <spring-osgi:service ref="testRoute"

What am I missing? How can I get a notification callback when the
configuration is changed when using a managed-service-factory?

Happy for any clues you may have.

By the way is this the recommended way to use managed service factories? Are
there any other (non Spring-DM) ways of doing this? IPojo for example.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message