Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Registering two services in the same bundle

Hi,

 

I would like to know what I have to do for registering two different services in a same bundle. I mean, I have two create a service object which implements two different interfaces (registering two different services). I thought about using registerService(java.lang.String[] clazzes,java.lang.Object service,

java.util.Dictionary properties) by including Interface1.class.getName() and Interface2.class.getName() in String array called clazzes.

 

However, I found as a problem that if I want to use this object service I have to get two service objects, one for Interface1 and another one for Interface2 by doing BundleContext.getServiceReference(Interface1) & BundleContext.getServiceReference(Interface2), am I missing anything?Does it exist another way to do that?

 

Thanks in advance


Back to the top