[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
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:
> Hi,
> 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@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev