I have read the compendium specification about Metatypes and it is not
clear for me.

It is suppose I must register my service under the Metatype provider
interface, something like this:

                  // Registering the Metatype Provider
                  Hashtable regProps = new Hashtable();
                  regProps.put(Constants.SERVICE_PID, miPID);
                  regProps.put("metadata.type", "Config");
                  sReg = 
context.registerService(MetaTypeProvider.class.getName(),
conf, regProps);


But I dont understand how it works. Actually it isnt working because I
can not see the configuration on the webconsole.

Metatype service is running because I can change the webconsole
configuration. :-s

Could you tell me where can I find a dummy example?

thank you very much once more,

Miguel



On Tue, 2008-10-28 at 15:18 +0100, Felix Meschberger wrote:

> Hi Miguel,
> 
> Felix Meschberger schrieb:
> > Hi Miguel,
> > 
> > Miguel schrieb:
> >> so, what should I do to force that my bundles that implement
> >> ManagedService (which I am able to configure using another bundle
> >> configuration with the service of the config admin)  appear in the web
> >> console?
> > 
> > Basically you have to options (see the Metatype Service specification
> > for the exact details): Have your ManagedService implement the
> > MetaTypeProvider interface (and register as a service) or provide a
> > Metatype descriptor file in the OSGI-INF/metatype folder in your bundle.
> > (Note, that the MetaTypeProvider objects of a bundle are ignored if the
> > bundle has descriptors in OSGI-INF/metatype).
> > 
> > Finally, ensure you have the Metatype service implementation running,
> > such that the web console is able to call it.
> > 
> > When the Metatype service can provide information about your
> > ManagedService, the configuration admin panel is able to display the
> > configuration.
> > 
> > Regards
> > Felix
> > 
> 
> In addition you may use the maven-scr-plugin using @scr.component tags
> to have the metatype file generated for you. If you do not want to use
> declarative services just set the ds attribute of the @scr.component tag
> to the value "no" to prevent declarative services descriptors to be
> generated.
> 
> Regards
> Felix
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

Reply via email to