karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steinar Bang ...@dod.no>
Subject Re: How's config connected to a bundle
Date Thu, 07 Dec 2017 19:02:25 GMT
>>>>> Timothy Ward <tim.ward@paremus.com>:

> That does look like it should be working - what do the scr commands
> display when you look at your component?

I've got it working now: the trick was to use the fully qualified class
name as the PID.

But thanks for the heads up on the "scr:*" commands.  Lots of
interesting information there, from commands like:
 scr:list
 scr:components
 scr:details no.priv.bang.sonar.collector.webhook.SonarCollectorServlet
 scr:info no.priv.bang.sonar.collector.webhook.SonarCollectorServlet
gavve a lot of intomation.

> Note that your component will be activated without any configuration
> (for example if your configuration doesn’t exist when the component’s
> bundle is started) because it is using the default configuration
> policy of optional. This is why you see the component start up with
> just the default properties. If starting without configuration causes
> your component to fail then you should change this policy.

No I'm good with that.

The plan is for the normal case the database will work without any
external configuration, exepecting to connect to a PostgreSQL database
running on localhost as a PostgreSQL user with user name matching the
username of the karaf process (my own user when running a development
system and user "karaf" on a debian server).

But I want users to be able to configure the database connection in
karaf config if they want to eg. connect to a PostgreSQL server running
on a different host.

And now it looks like it's working so I'll just do a little cleanup and
push. :-)


Mime
View raw message