Re: Does a DS Component and Service have to be the same class?

2011-01-13 Thread Peter Kriens
Well, you get ALL the goodies of DS's dependency handling, you can still depend on other services and you get the properties. Seems like powerful goodies to me over a Bundle Activator ... You could try subclassing and get the configuration parameters in a static method you call from the

Re: Does a DS Component and Service have to be the same class?

2011-01-11 Thread Peter Kriens
Why not register your object with the Bundle Context, which you can get from the Component Context? reg = ccontext.getBundleContext().registerService( class, serviceObject, properties); In the deactivate, just unregister this service. It do not think it gets much easier? Kind

Does a DS Component and Service have to be the same class?

2011-01-10 Thread David Jencks
Based on studying the DS spec and FELIX-2563 I think the answer is yes but I'd like to double check. I want to have a factory class as my DS Component that creates a single framework-wide instance of the service that will get registered (configured from the properties the component gets). I

Re: Does a DS Component and Service have to be the same class?

2011-01-10 Thread Felix Meschberger
Hi, Am Montag, den 10.01.2011, 23:31 + schrieb David Jencks: Based on studying the DS spec and FELIX-2563 I think the answer is yes but I'd like to double check. Yes, a component is a single class, which is also used as the service if it declares one or more Service elements. I want

Re: Does a DS Component and Service have to be the same class?

2011-01-10 Thread David Jencks
On Jan 10, 2011, at 3:41 PM, Felix Meschberger wrote: Hi, Am Montag, den 10.01.2011, 23:31 + schrieb David Jencks: Based on studying the DS spec and FELIX-2563 I think the answer is yes but I'd like to double check. Yes, a component is a single class, which is also used as the