Hi Andrew,

In general The persistent id is reflected as property ${service.pid}
As far as I know if you have a bundle that can provied functionality a
number of times and each time with different configuration dictonary
the best approach
is use  Managed Service Factory.

Say that,  this is not your case, correct me if I'm wrong, you have
n-bundle with n-configuration files, with different name, which are
symlinks.
Is it correct ?


Regards

--Filippo

2014-07-25 4:29 GMT+02:00 Andrew Thorburn <[email protected]>:
> OK, thanks for that. Just looking my configuration, I've got it like so:
>
> <cm:property-placeholder id="org.properties" persistent-id="org"
> update-strategy="reload">
> .
> .
> .
> </cm:property-placeholder>
>
> And that's the same for all of them. Do I just need to change the id from
> "org.properties" to "<bundle>.org.properties" so that it's unique per
> bundle? Or do I need to have a unique persistent-id per bundle as well?
>
> If the persistent-id needs to be unique per bundle, then I guess I will have
> multiple files, which are symlinks to the actual configuration file.
>
> Thanks,
>
> - Andrew
>
>
> On Fri, Jul 25, 2014 at 3:38 AM, Filippo Balicchia <[email protected]>
> wrote:
>>
>> Hi Andrew,
>>
>> I don' t have direct experiences but I think that Compendium service
>> not allows to have an association service.pid *..1 to File
>> Please check http://www.osgi.org/download/r4v42/r4.cmpn.pdf
>>
>>
>> Regards
>>
>> --Filippo
>>
>> 2014-07-24 12:14 GMT+02:00 Andrew Thorburn <[email protected]>:
>> > I've noticed an odd issue in SMX. I've got a few projects that run in
>> > SMX,
>> > all Blueprint Camel projects, and sometimes some of them seem to get
>> > into
>> > an infinite loop when starting up. I've (finally) tracked it down to the
>> > fact that the <cm:propertyPlaceholder> element in each of them is
>> > constantly triggering a refresh. So the bundle loads, then it goes "Oh
>> > dear, the properties file needs updating!", so it unloads the bundle,
>> > then
>> > loads it again. Then it forces an update of the properties file, forcing
>> > another bundle unload, and so on, never stopping. Except that sometimes
>> > it
>> > doesn't do that, and it just starts up normally.
>> >
>> > Has anyone seen this behaviour before? I'm not sure if I should be
>> > reporting it as a bug in Felix or Aries...
>> >
>> > I also think it has a lot to do with the fact that I have multiple
>> > bundles
>> > that share a single configuration file - three of the bundles all share
>> > a
>> > configuration file. If I only have one bundle that uses this particular
>> > configuration file active, then no problems (well, kinda - if it has
>> > previously been in a loop, it may take a few restarts before it stops
>> > looping). It also doesn't seem to be an issue if the bundles are
>> > reasonably
>> > far apart in the startup order, which suggests a race condition, but I'm
>> > not sufficiently knowledgeable about Karaf / Aries / Felix to be able to
>> > easily debug this. The really odd bit is that it will quite happily
>> > start
>> > two of the three bundles, but get stuck on the last.
>> >
>> > Has anyone experienced this before? Is there a better way than having
>> > multiple bundles sharing one config file? I suppose I could create
>> > multiple
>> > config files and symlink them, see if that solves it.
>> >
>> > Thanks,
>> >
>> > - Andrew Thorburn
>
>

Reply via email to