>>>>> David Jencks <[email protected]>:

> I’d expect your component with a specified PID to work, are you sure
> it didn’t?  It turns out that DS cannot reliably set the bundle
> location; when it tried to it turns out there is an unavoidable race
> condition.  Therefore DS does not try to set the bundle location, so
> don’t expect it to change.

Right! So looking at the BundleLocation was just a red herring...?

> I generally use the default component pid (the fully qualified class
> name or component name if specified) or give it a name distinct from
> the bundle name unless the config is shared by several components in
> the same bundle.

When I used the fully qualified class name, rather than the bundle name,
things started working.

If I do this:
 config:edit no.priv.bang.sonar.collector.webhook.SonarCollectorServlet
 config:property-set sonar.collector.jdbc.url 
"jdbc:postgresql:///sonarcollector"
 config:property-set sonar.collector.jdbc.user "karaf
 config:update

Then I get the following in the config parameter to the activate() method:
 {service.pid=no.priv.bang.sonar.collector.webhook.SonarCollectorServlet, 
sonar.collector.jdbc.user=karaf, alias=/sonar-collector, 
component.name=no.priv.bang.sonar.collector.webhook.SonarCollectorServlet, 
configurationPid=no.priv.bang.sonar.sonar-collector-webhook, component.id=2, 
sonar.collector.jdbc.url=jdbc:postgresql:///sonarcollector}

And that meant the configuration is now working!

Thanks! :-)

Reply via email to