same thing...
this is the content of OSGI-INF/metatype/metatype.xml

<?xml version="1.0" encoding="UTF-8"?>
<metatype:MetaData xmlns:metatype="http://www.osgi.org/xmlns/metatype/v1.0.0";
localization="OSGI-INF/metatype/metatype">
    <metatype:OCD
id="org.apache.felix.examples.dictionaryservice.impl.manager" name="%
org.apache.felix.examples.dictionaryservice.impl.manager.name"
description="%org.apache.felix.examples.dictionaryservice.impl.manager.description">
        <metatype:AD id="username" type="String" default="username" name="%
username.name" description="%username.description"/>
    </metatype:OCD>
    <metatype:Designate
pid="org.apache.felix.examples.dictionaryservice.impl.manager">
        <metatype:Object
ocdref="org.apache.felix.examples.dictionaryservice.impl.manager"/>
    </metatype:Designate>
</metatype:MetaData>

does this help?

regards,
paulo f

On Fri, Jan 16, 2009 at 7:25 PM, Felix Meschberger <[email protected]>wrote:

> Hi Paulo,
>
> Paulo Sergio schrieb:
> > Hi Felix,
> > thanks for the quick answer!
> > i am using the maven-scr-plugin and i created a sample class with the
> > folowing atribute:
> > /**
> >      * @scr.property valueRef="DEFAULT_USER_NAME"
> >      */
> >     private static final String DEFAULT_USER_NAME = "username";
> >
> > the file /OSGI-INF/metatype/metatype.xml is create and is inside the jar
> > file but when i install it the is no info about this in the webconsole
> > configuration tab...
> >
> > am i doing anytging wrong? or expecting something wrong?
>
> You are probably missing the @scr.component tag. This has to be placed
> in the class javadoc and signals to the scr plugin to actually process
> the class.
>
> You might want to set the "ds" attribute to false if you are not doing
> declarative services.
>
> For example:
>
>   /**
>    * @scr.component ds="false"
>    */
>   public class Foo {
>
>      /** @scr.property valueRef="DEFAULT_USER_NAME" */
>       private static final String DEFAULT_USER_NAME = "username";
>
>   }
>
> This should do the trick.
>
> Regards
> Felix
>
> >
> > regards,
> > paulo f
> >
> > On Fri, Jan 16, 2009 at 7:03 PM, Felix Meschberger <[email protected]
> >wrote:
> >
> >> Hi Paulo
> >>
> >> Paulo Sergio schrieb:
> >>> hi guys,
> >>> i'm new to felix and i'm developing a simple module that i would like
> to
> >>> make configurable using the felix web console interface.
> >>> I've seen some of the modules do that so i wonder if other modules can
> >> use
> >>> that.
> >> Sure you can. This is based on two OSGi specifications: The
> >> Configuration Admin specification, which defines how configuration is
> >> provided to configurable services and how to manage the configuration.
> >> The other specification used is the Metatype Specification which defines
> >> how configuration is described, such that the Web Console can create the
> >> input forms.
> >>
> >> If you are using the Maven SCR Plugin [1] you can add JavaDoc tags to
> >> your class and have the Metatype Specification automatically created in
> >> your bundle.
> >>
> >> Of course you also have to care to get the configuration: The basic way
> >> is to register a ManagedService (or ManagedServiceFactory) service which
> >> is provided with the configuration. Another way is to use Declarative
> >> Services where the configuration is provided to the
> >> activate(ComponentContext) method. A third way is iPOJO.
> >>
> >> For more information on Declarative Services see [2]. For a small
> >> introduction to Configuration Admin see [3].
> >>
> >>> any help on this?
> >> Hope this helps.
> >>
> >> Regards
> >> Felix
> >>
> >> [1] http://felix.apache.org/site/apache-felix-maven-scr-plugin.html
> >> [2]
> >>
> http://felix.apache.org/site/apache-felix-service-component-runtime.html
> >> [3]
> >>
> http://felix.apache.org/site/apache-felix-configuration-admin-service.html
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to