[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [equinox-dev] Configuration Admin Question
- From: "David Conde" <dconde@xxxxxxxx>
- Date: Wed, 4 Nov 2009 14:09:58 +0100
- Delivered-to: email@example.com
- Thread-index: AcpdSW8DdTxX0VU9RYeqWc/7c6wcqAABdcPg
Thank for your answer, it was very helpful for me. Just this was what I did not understand, thanks very much.
I have another question, when is the method updated(String, Dictionary) of MSF called, is it called by event, or do I have to do it when I wish to get another instance for my second device?
Thanks in advance
De: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] En nombre de Neil Bartlett
Enviado el: miÃrcoles, 04 de noviembre de 2009 13:23
Para: Equinox development mailing list
Asunto: Re: [equinox-dev] Configuration Admin Question
Yes it sounds like Config Admin with a ManagedServiceFactory (MSF) may
fit your requirements.
I agree that Config Admin is difficult to understand -- I struggled
with it initially as well. I think that the key to understanding MSFs
is that you do not control the PID. You call
createFactoryConfiguration() with the FactoryPID, and a PID is
generated for you by the Config Admin implementation bundle. If you
later need the PID then you have to get it from the Configuration
object returned to you from createFactoryConfiguration().
Hope that helps,
On Wed, Nov 4, 2009 at 12:00 PM, David Conde <dconde@xxxxxxxx> wrote:
> I am thinking about using Configuration Admin Service for my scenario where
> I have to install different bundles which provide services to use different
> devices. The problem is the next one, if I have many equal devices (just
> with different configuration) I would have to use the same bundle which I
> would get an DuplicateBundle_Error because I can not install again this
> bundle, what It is normal because it would be a waste of resources. For this
> reason I though to use Configuration Admin Service with
> ManageServiceFactory, which lets me to use different instances of a same
> service. I have been reading about Configuration Admin Examples and
> Configuration Admin Service documentation in OSGI compendium but I do not
> understand very well how exactly this service works, because I do not see
> the relation between Factory_PID and Service PID. If I want to create new
> instances of my services, when I create a new Configuration for example, I
> would like to create create a new PID for my new Configuration and not to
> call the PID_Factory, how can I create a new configuration for a new
> instance with a new PID?
> There are another way to manage bundles for devices different of Config
> Admin Service?
> Thank you in advance
> equinox-dev mailing list
equinox-dev mailing list