You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Paulo Sergio <pa...@gmail.com> on 2009/01/16 19:49:00 UTC

configuration of bundle using web console

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.

any help on this?

thanks,
paulo f

Re: configuration of bundle using web console

Posted by Paulo Sergio <pa...@gmail.com>.
tryed to build latest version of felix (svn trunk ) and my module with java
6 and the issue is the same... but it still working on sling 3

does anybody have a clue?

cheers,

paulo f


On Wed, Jan 28, 2009 at 6:10 AM, Paulo Sergio <pa...@gmail.com> wrote:

> hi Carsten,
> here are my META-INF and OSGI-INF contents
>
> inside the META-INF i have the manifest.mf
>
> this is the content:
>
> Manifest-Version: 1.0
> Export-Package: org.apache.felix.examples.dictionaryservice
> Private-Package: com.pauloslf.Server,com.pauloslf.Server.comma
>  nds,com.pauloslf.Server.manager,com.pauloslf.Server.responses
>  ,com.pauloslf.Server.state,javax.servlet,javax.servlet.http,junit
>  .extensions,junit.framework,junit.runner,junit.textui,org.apache.feli
>  x.bundlerepository,org.apache.felix.bundlerepository.metadataparser,o
>  rg.apache.felix.bundlerepository.metadataparser.kxmlsax,org.apache.fe
>  lix.examples.dictionaryservice.impl,org.apache.log4j,org.apache.log4j
>  .chainsaw,org.apache.log4j.config,org.apache.log4j.helpers,org.apache
>  .log4j.jdbc,org.apache.log4j.jmx,org.apache.log4j.lf5,org.apache.log4
>  j.lf5.config,org.apache.log4j.lf5.util,org.apache.log4j.lf5.viewer,or
>  g.apache.log4j.lf5.viewer.categoryexplorer,org.apache.log4j.lf5.viewe
>  r.configure,org.apache.log4j.lf5.viewer.images,org.apache.log4j.net,o
>  rg.apache.log4j.nt,org.apache.log4j.or,org.apache.log4j.or.jms,org.ap
>  ache.log4j.or.sax,org.apache.log4j.spi,org.apache.log4j.varia,org.apa
>  che.log4j.xml,org.apache.mina.core,org.apache.mina.core.buffer,org.ap
>  ache.mina.core.file,org.apache.mina.core.filterchain,org.apache.mina.
>  core.future,org.apache.mina.core.polling,org.apache.mina.core.service
>  ,org.apache.mina.core.session,org.apache.mina.core.write,org.apache.m
>  ina.filter.buffer,org.apache.mina.filter.codec,org.apache.mina.filter
>  .codec.demux,org.apache.mina.filter.codec.prefixedstring,org.apache.m
>  ina.filter.codec.serialization,org.apache.mina.filter.codec.statemach
>  ine,org.apache.mina.filter.codec.textline,org.apache.mina.filter.erro
>  rgenerating,org.apache.mina.filter.executor,org.apache.mina.filter.fi
>  rewall,org.apache.mina.filter.keepalive,org.apache.mina.filter.loggin
>  g,org.apache.mina.filter.reqres,org.apache.mina.filter.ssl,org.apache
>  .mina.filter.statistic,org.apache.mina.filter.stream,org.apache.mina.
>  filter.util,org.apache.mina.handler.chain,org.apache.mina.handler.dem
>  ux,org.apache.mina.handler.multiton,org.apache.mina.handler.stream,or
>  g.apache.mina.transport.socket,org.apache.mina.transport.socket.nio,o
>  rg.apache.mina.transport.vmpipe,org.apache.mina.util,org.hamcrest,org
>  .hamcrest.core,org.hamcrest.internal,org.junit,org.junit.experimental
>  .results,org.junit.experimental.theories,org.junit.experimental.theor
>  ies.internal,org.junit.experimental.theories.suppliers,org.junit.inte
>  rnal,org.junit.internal.requests,org.junit.internal.runners,org.junit
>  .matchers,org.junit.runner,org.junit.runner.manipulation,org.junit.ru
>  nner.notification,org.junit.runners,org.kxml2.io,org.kxml2.kdom,org.k
>  xml2.wap,org.kxml2.wap.syncml,org.kxml2.wap.wml,org.kxml2.wap.wv,org.
>  osgi.service.obr;version="1.0",org.slf4j,org.slf4j.helpers,org.slf4j.
>  impl,org.slf4j.spi,org.xmlpull.v1
> Bundle-ClassPath: .,mina-core-2.0.0-M3.jar,slf4j-api-1.5.6.jar,javax.s
>  ervlet-1.0.0.jar,log4j-1.2.14.jar,org.apache.felix.bundlerepository-1
>  .0.3.jar,slf4j-log4j12-1.5.6.jar,junit-4.4.jar,Server-1.0.0.jar
> Built-By: sergio
> Tool: Bnd-0.0.238
> Bundle-Name: tes bundle mina server
> Created-By: Apache Maven Bundle Plugin
> Bundle-Vendor: pauloslf
> Build-Jdk: 1.6.0_10
> Bundle-Version: 0.9.0.SNAPSHOT
> Bnd-LastModified: 1232652086744
> Bundle-ManifestVersion: 2
> Bundle-Activator: org.apache.felix.examples.dictionaryservice.impl.Act
>  ivator
> Bundle-Description: A bundle that registersan English dictionary servi
>  ce.
> Embed-Dependency: *;scope=compile|runtime;inline=false
> Import-Package: com.sun.jdmk.comm;resolution:=optional,javax.jms;resol
>  ution:=optional,javax.mail;resolution:=optional,javax.mail.internet;r
>  esolution:=optional,javax.management,javax.naming,javax.net.ssl,javax
>  .swing,javax.swing.border,javax.swing.event,javax.swing.table,javax.s
>  wing.text,javax.swing.tree,javax.xml.parsers,org.apache.felix.example
>  s.dictionaryservice,org.apache.felix.shell;version="1.0",org.osgi.fra
>  mework,org.osgi.service.metatype,org.w3c.dom,org.xml.sax,org.xml.sax.
>  helpers
> Bundle-SymbolicName: test mina server
>
> ------------------------------------------------------------------------------------------------------------------
>
> in my OSGI-INF i have /OSGI-INF/metatype/metatype.xml
> it's content is :
>
> <?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="asd"
> description="asdasd">
>         <metatype:AD id="username" type="String" default="admin"
> name="4444" description="33"/>
>     </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?
>
> thanks in advance,
> paulo f
>
>
> On Wed, Jan 28, 2009 at 1:33 PM, Carsten Ziegeler <cz...@apache.org>wrote:
>
>> Paulo Sergio wrote:
>> > sorry to keep bothering you guys..
>> >
>> > i tryed to install all the modules available on Sling (except the ones
>> > started with Sling - ) on Felix,
>> > but event after that i was not able to see the configurations of my
>> module..
>> >
>> > another issue is that on my felix instalation i can only see the
>> > configuration for the webconsole.. shouln't i have more configurations
>> > available there?
>> >
>> The console only displays:
>> - all configurations from the config admin
>> - default configurations if information for the meta type service is
>> provided
>>
>> If you have a clean installation there are usually no configurations
>> stored in the config admin. And from your bundle list only the
>> webconsole provides the meta type service information. That's why you're
>> only seeing this one in the list.
>>
>> Can you list the contents of the META-INF directory of your bundle?
>>
>> Carsten
>> --
>> Carsten Ziegeler
>> cziegeler@apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>

Re: configuration of bundle using web console

Posted by Paulo Sergio <pa...@gmail.com>.
hi Carsten,
here are my META-INF and OSGI-INF contents

inside the META-INF i have the manifest.mf

this is the content:

Manifest-Version: 1.0
Export-Package: org.apache.felix.examples.dictionaryservice
Private-Package: com.pauloslf.Server,com.pauloslf.Server.comma
 nds,com.pauloslf.Server.manager,com.pauloslf.Server.responses
 ,com.pauloslf.Server.state,javax.servlet,javax.servlet.http,junit
 .extensions,junit.framework,junit.runner,junit.textui,org.apache.feli
 x.bundlerepository,org.apache.felix.bundlerepository.metadataparser,o
 rg.apache.felix.bundlerepository.metadataparser.kxmlsax,org.apache.fe
 lix.examples.dictionaryservice.impl,org.apache.log4j,org.apache.log4j
 .chainsaw,org.apache.log4j.config,org.apache.log4j.helpers,org.apache
 .log4j.jdbc,org.apache.log4j.jmx,org.apache.log4j.lf5,org.apache.log4
 j.lf5.config,org.apache.log4j.lf5.util,org.apache.log4j.lf5.viewer,or
 g.apache.log4j.lf5.viewer.categoryexplorer,org.apache.log4j.lf5.viewe
 r.configure,org.apache.log4j.lf5.viewer.images,org.apache.log4j.net,o
 rg.apache.log4j.nt,org.apache.log4j.or,org.apache.log4j.or.jms,org.ap
 ache.log4j.or.sax,org.apache.log4j.spi,org.apache.log4j.varia,org.apa
 che.log4j.xml,org.apache.mina.core,org.apache.mina.core.buffer,org.ap
 ache.mina.core.file,org.apache.mina.core.filterchain,org.apache.mina.
 core.future,org.apache.mina.core.polling,org.apache.mina.core.service
 ,org.apache.mina.core.session,org.apache.mina.core.write,org.apache.m
 ina.filter.buffer,org.apache.mina.filter.codec,org.apache.mina.filter
 .codec.demux,org.apache.mina.filter.codec.prefixedstring,org.apache.m
 ina.filter.codec.serialization,org.apache.mina.filter.codec.statemach
 ine,org.apache.mina.filter.codec.textline,org.apache.mina.filter.erro
 rgenerating,org.apache.mina.filter.executor,org.apache.mina.filter.fi
 rewall,org.apache.mina.filter.keepalive,org.apache.mina.filter.loggin
 g,org.apache.mina.filter.reqres,org.apache.mina.filter.ssl,org.apache
 .mina.filter.statistic,org.apache.mina.filter.stream,org.apache.mina.
 filter.util,org.apache.mina.handler.chain,org.apache.mina.handler.dem
 ux,org.apache.mina.handler.multiton,org.apache.mina.handler.stream,or
 g.apache.mina.transport.socket,org.apache.mina.transport.socket.nio,o
 rg.apache.mina.transport.vmpipe,org.apache.mina.util,org.hamcrest,org
 .hamcrest.core,org.hamcrest.internal,org.junit,org.junit.experimental
 .results,org.junit.experimental.theories,org.junit.experimental.theor
 ies.internal,org.junit.experimental.theories.suppliers,org.junit.inte
 rnal,org.junit.internal.requests,org.junit.internal.runners,org.junit
 .matchers,org.junit.runner,org.junit.runner.manipulation,org.junit.ru
 nner.notification,org.junit.runners,org.kxml2.io,org.kxml2.kdom,org.k
 xml2.wap,org.kxml2.wap.syncml,org.kxml2.wap.wml,org.kxml2.wap.wv,org.
 osgi.service.obr;version="1.0",org.slf4j,org.slf4j.helpers,org.slf4j.
 impl,org.slf4j.spi,org.xmlpull.v1
Bundle-ClassPath: .,mina-core-2.0.0-M3.jar,slf4j-api-1.5.6.jar,javax.s
 ervlet-1.0.0.jar,log4j-1.2.14.jar,org.apache.felix.bundlerepository-1
 .0.3.jar,slf4j-log4j12-1.5.6.jar,junit-4.4.jar,Server-1.0.0.jar
Built-By: sergio
Tool: Bnd-0.0.238
Bundle-Name: tes bundle mina server
Created-By: Apache Maven Bundle Plugin
Bundle-Vendor: pauloslf
Build-Jdk: 1.6.0_10
Bundle-Version: 0.9.0.SNAPSHOT
Bnd-LastModified: 1232652086744
Bundle-ManifestVersion: 2
Bundle-Activator: org.apache.felix.examples.dictionaryservice.impl.Act
 ivator
Bundle-Description: A bundle that registersan English dictionary servi
 ce.
Embed-Dependency: *;scope=compile|runtime;inline=false
Import-Package: com.sun.jdmk.comm;resolution:=optional,javax.jms;resol
 ution:=optional,javax.mail;resolution:=optional,javax.mail.internet;r
 esolution:=optional,javax.management,javax.naming,javax.net.ssl,javax
 .swing,javax.swing.border,javax.swing.event,javax.swing.table,javax.s
 wing.text,javax.swing.tree,javax.xml.parsers,org.apache.felix.example
 s.dictionaryservice,org.apache.felix.shell;version="1.0",org.osgi.fra
 mework,org.osgi.service.metatype,org.w3c.dom,org.xml.sax,org.xml.sax.
 helpers
Bundle-SymbolicName: test mina server
------------------------------------------------------------------------------------------------------------------

in my OSGI-INF i have /OSGI-INF/metatype/metatype.xml
it's content is :

<?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="asd"
description="asdasd">
        <metatype:AD id="username" type="String" default="admin" name="4444"
description="33"/>
    </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?

thanks in advance,
paulo f


On Wed, Jan 28, 2009 at 1:33 PM, Carsten Ziegeler <cz...@apache.org>wrote:

> Paulo Sergio wrote:
> > sorry to keep bothering you guys..
> >
> > i tryed to install all the modules available on Sling (except the ones
> > started with Sling - ) on Felix,
> > but event after that i was not able to see the configurations of my
> module..
> >
> > another issue is that on my felix instalation i can only see the
> > configuration for the webconsole.. shouln't i have more configurations
> > available there?
> >
> The console only displays:
> - all configurations from the config admin
> - default configurations if information for the meta type service is
> provided
>
> If you have a clean installation there are usually no configurations
> stored in the config admin. And from your bundle list only the
> webconsole provides the meta type service information. That's why you're
> only seeing this one in the list.
>
> Can you list the contents of the META-INF directory of your bundle?
>
> Carsten
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: configuration of bundle using web console

Posted by Carsten Ziegeler <cz...@apache.org>.
Paulo Sergio wrote:
> sorry to keep bothering you guys..
> 
> i tryed to install all the modules available on Sling (except the ones
> started with Sling - ) on Felix,
> but event after that i was not able to see the configurations of my module..
> 
> another issue is that on my felix instalation i can only see the
> configuration for the webconsole.. shouln't i have more configurations
> available there?
> 
The console only displays:
- all configurations from the config admin
- default configurations if information for the meta type service is
provided

If you have a clean installation there are usually no configurations
stored in the config admin. And from your bundle list only the
webconsole provides the meta type service information. That's why you're
only seeing this one in the list.

Can you list the contents of the META-INF directory of your bundle?

Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: configuration of bundle using web console

Posted by Paulo Sergio <pa...@gmail.com>.
sorry to keep bothering you guys..

i tryed to install all the modules available on Sling (except the ones
started with Sling - ) on Felix,
but event after that i was not able to see the configurations of my module..

another issue is that on my felix instalation i can only see the
configuration for the webconsole.. shouln't i have more configurations
available there?


thanks in advance,
paulo f
On Wed, Jan 21, 2009 at 9:01 PM, Paulo Sergio <pa...@gmail.com> wrote:

>  that bundle was used as a base to make my experiments, just because it is
> simple :)
> so, that's my bundle
>
> paulo f
>
>
> On Wed, Jan 21, 2009 at 8:59 PM, Richard S. Hall <he...@ungoverned.org>wrote:
>
>> Hard to believe the "Example English Dictionary" bundle is required. :-)
>>
>> -> richard
>>
>>
>> Paulo Sergio wrote:
>>
>>> these are the modules i have installed:
>>> [   0] [Active     ] [    0] System Bundle (1.4.1)
>>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.0.2)
>>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.0.2)
>>> [   3] [Active     ] [    1] Apache Felix Bundle Repository (1.2.1)
>>> [   4] [Active     ] [    1] OPS4J - Pax Logging - API (1.2.1)
>>> [   5] [Active     ] [    1] OPS4J - Pax Logging - Service (1.2.1)
>>> [   6] [Active     ] [    1] OPS4J Pax Web - Service (0.5.1)
>>> [   7] [Active     ] [    1] Apache Felix EventAdmin (1.0.0)
>>> [   8] [Active     ] [    1] Apache Felix Configuration Admin Service
>>> (1.0.4)
>>> [  12] [Active     ] [    1] Apache Felix Declarative Services (1.0.6)
>>> [  13] [Active     ] [    1] Apache Felix Metatype Service (1.0.2)
>>> [  14] [Active     ] [    1] Apache Felix Web Management Console (1.2.2)
>>> [  16] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
>>> [  17] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
>>> [  20] [Active     ] [    1]
>>> file:bundle/new/org.osgi.foundation-1.2.0.jar
>>> [  21] [Active     ] [    1] OSGi OBR Service API (1)
>>> [  22] [Active     ] [    1] Example English Dictionary (0.9.0.SNAPSHOT)
>>> [  23] [Active     ] [    1] Apache Felix Prefrences Service (1.0.2)
>>>
>>>
>>> On Wed, Jan 21, 2009 at 6:43 PM, Paulo Sergio <pa...@gmail.com>
>>> wrote:
>>>
>>>
>>>
>>>> found the issue :)
>>>> i installed apache sling (based on felix) then i installed my module and
>>>> it
>>>> worked!
>>>> so now my question is: what am i missing on the default felix
>>>> instalation?
>>>>
>>>> thanks in advance
>>>> paulo
>>>>
>>>>
>>>>
>>>> On Tue, Jan 20, 2009 at 6:00 PM, Paulo Sergio <pa...@gmail.com>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>> sorry to bother again, but does the metatype.properties has anyting to
>>>>> do
>>>>> with this?
>>>>> if so, how is it connected with the class that i made(that contains the
>>>>> configurable attributes)
>>>>>
>>>>> thanks,
>>>>>  paulo f
>>>>>
>>>>>
>>>>> On Mon, Jan 19, 2009 at 1:47 PM, Paulo Sergio <pa...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>
>>>>>
>>>>>> hi Carsten,
>>>>>>
>>>>>> ok, basically what i want is a way to configure my bundle using the
>>>>>> web-console..
>>>>>> is it possible to have my own tab in the web interface? better :) but
>>>>>> how?
>>>>>> anyway to me is enough to have any way to configure my bundle
>>>>>> properties
>>>>>> in the web interface.. (probably using the configurations tab!?)
>>>>>>
>>>>>> thanks!
>>>>>> .paulo
>>>>>>
>>>>>>
>>>>>> On Mon, Jan 19, 2009 at 9:02 AM, Carsten Ziegeler <
>>>>>> cziegeler@apache.org>wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Paulo Sergio wrote:
>>>>>>>
>>>>>>>
>>>>>>>> looking at the metatype.xml
>>>>>>>>
>>>>>>>> i have the property :
>>>>>>>>
>>>>>>>> Service-Component: OSGI-INF/metatype/metatype.xml
>>>>>>>>
>>>>>>>> pointing to the right place, so this seems correct...
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> What do you exactly want to do? Do you want to have a configurable
>>>>>>> service
>>>>>>> in your bundle or do you rather want to have an own tab within the
>>>>>>> web
>>>>>>> console
>>>>>>> to administrate something in your bundle? From your first question, I
>>>>>>> assume you want the latter while I think what is currently discussed
>>>>>>> is
>>>>>>> the other thing :)
>>>>>>>
>>>>>>> Carsten
>>>>>>> --
>>>>>>> Carsten Ziegeler
>>>>>>> cziegeler@apache.org
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>

Re: configuration of bundle using web console

Posted by Paulo Sergio <pa...@gmail.com>.
 that bundle was used as a base to make my experiments, just because it is
simple :)
so, that's my bundle

paulo f

On Wed, Jan 21, 2009 at 8:59 PM, Richard S. Hall <he...@ungoverned.org>wrote:

> Hard to believe the "Example English Dictionary" bundle is required. :-)
>
> -> richard
>
>
> Paulo Sergio wrote:
>
>> these are the modules i have installed:
>> [   0] [Active     ] [    0] System Bundle (1.4.1)
>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.0.2)
>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.0.2)
>> [   3] [Active     ] [    1] Apache Felix Bundle Repository (1.2.1)
>> [   4] [Active     ] [    1] OPS4J - Pax Logging - API (1.2.1)
>> [   5] [Active     ] [    1] OPS4J - Pax Logging - Service (1.2.1)
>> [   6] [Active     ] [    1] OPS4J Pax Web - Service (0.5.1)
>> [   7] [Active     ] [    1] Apache Felix EventAdmin (1.0.0)
>> [   8] [Active     ] [    1] Apache Felix Configuration Admin Service
>> (1.0.4)
>> [  12] [Active     ] [    1] Apache Felix Declarative Services (1.0.6)
>> [  13] [Active     ] [    1] Apache Felix Metatype Service (1.0.2)
>> [  14] [Active     ] [    1] Apache Felix Web Management Console (1.2.2)
>> [  16] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
>> [  17] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
>> [  20] [Active     ] [    1] file:bundle/new/org.osgi.foundation-1.2.0.jar
>> [  21] [Active     ] [    1] OSGi OBR Service API (1)
>> [  22] [Active     ] [    1] Example English Dictionary (0.9.0.SNAPSHOT)
>> [  23] [Active     ] [    1] Apache Felix Prefrences Service (1.0.2)
>>
>>
>> On Wed, Jan 21, 2009 at 6:43 PM, Paulo Sergio <pa...@gmail.com> wrote:
>>
>>
>>
>>> found the issue :)
>>> i installed apache sling (based on felix) then i installed my module and
>>> it
>>> worked!
>>> so now my question is: what am i missing on the default felix
>>> instalation?
>>>
>>> thanks in advance
>>> paulo
>>>
>>>
>>>
>>> On Tue, Jan 20, 2009 at 6:00 PM, Paulo Sergio <pa...@gmail.com>
>>> wrote:
>>>
>>>
>>>
>>>> sorry to bother again, but does the metatype.properties has anyting to
>>>> do
>>>> with this?
>>>> if so, how is it connected with the class that i made(that contains the
>>>> configurable attributes)
>>>>
>>>> thanks,
>>>>  paulo f
>>>>
>>>>
>>>> On Mon, Jan 19, 2009 at 1:47 PM, Paulo Sergio <pa...@gmail.com>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>> hi Carsten,
>>>>>
>>>>> ok, basically what i want is a way to configure my bundle using the
>>>>> web-console..
>>>>> is it possible to have my own tab in the web interface? better :) but
>>>>> how?
>>>>> anyway to me is enough to have any way to configure my bundle
>>>>> properties
>>>>> in the web interface.. (probably using the configurations tab!?)
>>>>>
>>>>> thanks!
>>>>> .paulo
>>>>>
>>>>>
>>>>> On Mon, Jan 19, 2009 at 9:02 AM, Carsten Ziegeler <
>>>>> cziegeler@apache.org>wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Paulo Sergio wrote:
>>>>>>
>>>>>>
>>>>>>> looking at the metatype.xml
>>>>>>>
>>>>>>> i have the property :
>>>>>>>
>>>>>>> Service-Component: OSGI-INF/metatype/metatype.xml
>>>>>>>
>>>>>>> pointing to the right place, so this seems correct...
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> What do you exactly want to do? Do you want to have a configurable
>>>>>> service
>>>>>> in your bundle or do you rather want to have an own tab within the web
>>>>>> console
>>>>>> to administrate something in your bundle? From your first question, I
>>>>>> assume you want the latter while I think what is currently discussed
>>>>>> is
>>>>>> the other thing :)
>>>>>>
>>>>>> Carsten
>>>>>> --
>>>>>> Carsten Ziegeler
>>>>>> cziegeler@apache.org
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: configuration of bundle using web console

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Hard to believe the "Example English Dictionary" bundle is required. :-)

-> richard

Paulo Sergio wrote:
> these are the modules i have installed:
> [   0] [Active     ] [    0] System Bundle (1.4.1)
> [   1] [Active     ] [    1] Apache Felix Shell Service (1.0.2)
> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.0.2)
> [   3] [Active     ] [    1] Apache Felix Bundle Repository (1.2.1)
> [   4] [Active     ] [    1] OPS4J - Pax Logging - API (1.2.1)
> [   5] [Active     ] [    1] OPS4J - Pax Logging - Service (1.2.1)
> [   6] [Active     ] [    1] OPS4J Pax Web - Service (0.5.1)
> [   7] [Active     ] [    1] Apache Felix EventAdmin (1.0.0)
> [   8] [Active     ] [    1] Apache Felix Configuration Admin Service
> (1.0.4)
> [  12] [Active     ] [    1] Apache Felix Declarative Services (1.0.6)
> [  13] [Active     ] [    1] Apache Felix Metatype Service (1.0.2)
> [  14] [Active     ] [    1] Apache Felix Web Management Console (1.2.2)
> [  16] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
> [  17] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
> [  20] [Active     ] [    1] file:bundle/new/org.osgi.foundation-1.2.0.jar
> [  21] [Active     ] [    1] OSGi OBR Service API (1)
> [  22] [Active     ] [    1] Example English Dictionary (0.9.0.SNAPSHOT)
> [  23] [Active     ] [    1] Apache Felix Prefrences Service (1.0.2)
>
>
> On Wed, Jan 21, 2009 at 6:43 PM, Paulo Sergio <pa...@gmail.com> wrote:
>
>   
>> found the issue :)
>> i installed apache sling (based on felix) then i installed my module and it
>> worked!
>> so now my question is: what am i missing on the default felix instalation?
>>
>> thanks in advance
>> paulo
>>
>>
>>
>> On Tue, Jan 20, 2009 at 6:00 PM, Paulo Sergio <pa...@gmail.com> wrote:
>>
>>     
>>> sorry to bother again, but does the metatype.properties has anyting to do
>>> with this?
>>> if so, how is it connected with the class that i made(that contains the
>>> configurable attributes)
>>>
>>> thanks,
>>>  paulo f
>>>
>>>
>>> On Mon, Jan 19, 2009 at 1:47 PM, Paulo Sergio <pa...@gmail.com> wrote:
>>>
>>>       
>>>> hi Carsten,
>>>>
>>>> ok, basically what i want is a way to configure my bundle using the
>>>> web-console..
>>>> is it possible to have my own tab in the web interface? better :) but
>>>> how?
>>>> anyway to me is enough to have any way to configure my bundle properties
>>>> in the web interface.. (probably using the configurations tab!?)
>>>>
>>>> thanks!
>>>> .paulo
>>>>
>>>>
>>>> On Mon, Jan 19, 2009 at 9:02 AM, Carsten Ziegeler <cz...@apache.org>wrote:
>>>>
>>>>         
>>>>> Paulo Sergio wrote:
>>>>>           
>>>>>> looking at the metatype.xml
>>>>>>
>>>>>> i have the property :
>>>>>>
>>>>>> Service-Component: OSGI-INF/metatype/metatype.xml
>>>>>>
>>>>>> pointing to the right place, so this seems correct...
>>>>>>
>>>>>>             
>>>>> What do you exactly want to do? Do you want to have a configurable
>>>>> service
>>>>> in your bundle or do you rather want to have an own tab within the web
>>>>> console
>>>>> to administrate something in your bundle? From your first question, I
>>>>> assume you want the latter while I think what is currently discussed is
>>>>> the other thing :)
>>>>>
>>>>> Carsten
>>>>> --
>>>>> Carsten Ziegeler
>>>>> cziegeler@apache.org
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>
>>>>>
>>>>>           
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: configuration of bundle using web console

Posted by Paulo Sergio <pa...@gmail.com>.
these are the modules i have installed:
[   0] [Active     ] [    0] System Bundle (1.4.1)
[   1] [Active     ] [    1] Apache Felix Shell Service (1.0.2)
[   2] [Active     ] [    1] Apache Felix Shell TUI (1.0.2)
[   3] [Active     ] [    1] Apache Felix Bundle Repository (1.2.1)
[   4] [Active     ] [    1] OPS4J - Pax Logging - API (1.2.1)
[   5] [Active     ] [    1] OPS4J - Pax Logging - Service (1.2.1)
[   6] [Active     ] [    1] OPS4J Pax Web - Service (0.5.1)
[   7] [Active     ] [    1] Apache Felix EventAdmin (1.0.0)
[   8] [Active     ] [    1] Apache Felix Configuration Admin Service
(1.0.4)
[  12] [Active     ] [    1] Apache Felix Declarative Services (1.0.6)
[  13] [Active     ] [    1] Apache Felix Metatype Service (1.0.2)
[  14] [Active     ] [    1] Apache Felix Web Management Console (1.2.2)
[  16] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
[  17] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
[  20] [Active     ] [    1] file:bundle/new/org.osgi.foundation-1.2.0.jar
[  21] [Active     ] [    1] OSGi OBR Service API (1)
[  22] [Active     ] [    1] Example English Dictionary (0.9.0.SNAPSHOT)
[  23] [Active     ] [    1] Apache Felix Prefrences Service (1.0.2)


On Wed, Jan 21, 2009 at 6:43 PM, Paulo Sergio <pa...@gmail.com> wrote:

> found the issue :)
> i installed apache sling (based on felix) then i installed my module and it
> worked!
> so now my question is: what am i missing on the default felix instalation?
>
> thanks in advance
> paulo
>
>
>
> On Tue, Jan 20, 2009 at 6:00 PM, Paulo Sergio <pa...@gmail.com> wrote:
>
>> sorry to bother again, but does the metatype.properties has anyting to do
>> with this?
>> if so, how is it connected with the class that i made(that contains the
>> configurable attributes)
>>
>> thanks,
>>  paulo f
>>
>>
>> On Mon, Jan 19, 2009 at 1:47 PM, Paulo Sergio <pa...@gmail.com> wrote:
>>
>>> hi Carsten,
>>>
>>> ok, basically what i want is a way to configure my bundle using the
>>> web-console..
>>> is it possible to have my own tab in the web interface? better :) but
>>> how?
>>> anyway to me is enough to have any way to configure my bundle properties
>>> in the web interface.. (probably using the configurations tab!?)
>>>
>>> thanks!
>>> .paulo
>>>
>>>
>>> On Mon, Jan 19, 2009 at 9:02 AM, Carsten Ziegeler <cz...@apache.org>wrote:
>>>
>>>> Paulo Sergio wrote:
>>>> > looking at the metatype.xml
>>>> >
>>>> > i have the property :
>>>> >
>>>> > Service-Component: OSGI-INF/metatype/metatype.xml
>>>> >
>>>> > pointing to the right place, so this seems correct...
>>>> >
>>>>
>>>> What do you exactly want to do? Do you want to have a configurable
>>>> service
>>>> in your bundle or do you rather want to have an own tab within the web
>>>> console
>>>> to administrate something in your bundle? From your first question, I
>>>> assume you want the latter while I think what is currently discussed is
>>>> the other thing :)
>>>>
>>>> Carsten
>>>> --
>>>> Carsten Ziegeler
>>>> cziegeler@apache.org
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>>
>>
>

Re: configuration of bundle using web console

Posted by Paulo Sergio <pa...@gmail.com>.
found the issue :)
i installed apache sling (based on felix) then i installed my module and it
worked!
so now my question is: what am i missing on the default felix instalation?

thanks in advance
paulo


On Tue, Jan 20, 2009 at 6:00 PM, Paulo Sergio <pa...@gmail.com> wrote:

> sorry to bother again, but does the metatype.properties has anyting to do
> with this?
> if so, how is it connected with the class that i made(that contains the
> configurable attributes)
>
> thanks,
>  paulo f
>
>
> On Mon, Jan 19, 2009 at 1:47 PM, Paulo Sergio <pa...@gmail.com> wrote:
>
>> hi Carsten,
>>
>> ok, basically what i want is a way to configure my bundle using the
>> web-console..
>> is it possible to have my own tab in the web interface? better :) but how?
>> anyway to me is enough to have any way to configure my bundle properties
>> in the web interface.. (probably using the configurations tab!?)
>>
>> thanks!
>> .paulo
>>
>>
>> On Mon, Jan 19, 2009 at 9:02 AM, Carsten Ziegeler <cz...@apache.org>wrote:
>>
>>> Paulo Sergio wrote:
>>> > looking at the metatype.xml
>>> >
>>> > i have the property :
>>> >
>>> > Service-Component: OSGI-INF/metatype/metatype.xml
>>> >
>>> > pointing to the right place, so this seems correct...
>>> >
>>>
>>> What do you exactly want to do? Do you want to have a configurable
>>> service
>>> in your bundle or do you rather want to have an own tab within the web
>>> console
>>> to administrate something in your bundle? From your first question, I
>>> assume you want the latter while I think what is currently discussed is
>>> the other thing :)
>>>
>>> Carsten
>>> --
>>> Carsten Ziegeler
>>> cziegeler@apache.org
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>
>

Re: configuration of bundle using web console

Posted by Paulo Sergio <pa...@gmail.com>.
sorry to bother again, but does the metatype.properties has anyting to do
with this?
if so, how is it connected with the class that i made(that contains the
configurable attributes)

thanks,
 paulo f

On Mon, Jan 19, 2009 at 1:47 PM, Paulo Sergio <pa...@gmail.com> wrote:

> hi Carsten,
>
> ok, basically what i want is a way to configure my bundle using the
> web-console..
> is it possible to have my own tab in the web interface? better :) but how?
> anyway to me is enough to have any way to configure my bundle properties in
> the web interface.. (probably using the configurations tab!?)
>
> thanks!
> .paulo
>
>
> On Mon, Jan 19, 2009 at 9:02 AM, Carsten Ziegeler <cz...@apache.org>wrote:
>
>> Paulo Sergio wrote:
>> > looking at the metatype.xml
>> >
>> > i have the property :
>> >
>> > Service-Component: OSGI-INF/metatype/metatype.xml
>> >
>> > pointing to the right place, so this seems correct...
>> >
>>
>> What do you exactly want to do? Do you want to have a configurable service
>> in your bundle or do you rather want to have an own tab within the web
>> console
>> to administrate something in your bundle? From your first question, I
>> assume you want the latter while I think what is currently discussed is
>> the other thing :)
>>
>> Carsten
>> --
>> Carsten Ziegeler
>> cziegeler@apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>

Re: configuration of bundle using web console

Posted by Paulo Sergio <pa...@gmail.com>.
hi Carsten,

ok, basically what i want is a way to configure my bundle using the
web-console..
is it possible to have my own tab in the web interface? better :) but how?
anyway to me is enough to have any way to configure my bundle properties in
the web interface.. (probably using the configurations tab!?)

thanks!
.paulo

On Mon, Jan 19, 2009 at 9:02 AM, Carsten Ziegeler <cz...@apache.org>wrote:

> Paulo Sergio wrote:
> > looking at the metatype.xml
> >
> > i have the property :
> >
> > Service-Component: OSGI-INF/metatype/metatype.xml
> >
> > pointing to the right place, so this seems correct...
> >
>
> What do you exactly want to do? Do you want to have a configurable service
> in your bundle or do you rather want to have an own tab within the web
> console
> to administrate something in your bundle? From your first question, I
> assume you want the latter while I think what is currently discussed is
> the other thing :)
>
> Carsten
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: configuration of bundle using web console

Posted by Carsten Ziegeler <cz...@apache.org>.
Paulo Sergio wrote:
> looking at the metatype.xml
> 
> i have the property :
> 
> Service-Component: OSGI-INF/metatype/metatype.xml
> 
> pointing to the right place, so this seems correct...
> 

What do you exactly want to do? Do you want to have a configurable service
in your bundle or do you rather want to have an own tab within the web
console
to administrate something in your bundle? From your first question, I
assume you want the latter while I think what is currently discussed is
the other thing :)

Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: configuration of bundle using web console

Posted by Paulo Sergio <pa...@gmail.com>.
looking at the metatype.xml

i have the property :

Service-Component: OSGI-INF/metatype/metatype.xml

pointing to the right place, so this seems correct...



On Fri, Jan 16, 2009 at 7:32 PM, Paulo Sergio <pa...@gmail.com> wrote:

> 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 <fm...@gmail.com>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 <fmeschbe@gmail.com
>> >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: users-unsubscribe@felix.apache.org
>> >> For additional commands, e-mail: users-help@felix.apache.org
>> >>
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>

Re: deploy:bundle vs. deploy:bundle-file

Posted by Stuart McCulloch <mc...@gmail.com>.
On 17 Jan 2009, at 06:37, "Richard Feldman" <rt...@bjc.org> wrote:

> I have the following structure in my POM:
>
> <build>
>    <plugins>
>        <plugin>
>            <groupId>org.apache.felix</groupId>
>            <artifactId>maven-bundle-plugin</artifactId>
>            <extensions>true</extensions>
>            <configuration>
>                <remoteOBR>repository.xml</remoteOBR>
>                <url>scp://foo</url>
>                <groupId>${groupId}</groupId>
>                <artifactId>${artifactId}</artifactId>
>                <version>${version}</version>
>                <packaging>${packaging}</packaging>
>
> ...
>
> This works great for deploy:bundle, which updates repository.xml (or  
> anything else I change that to) remotely just fine. However, when I  
> run deploy:bundle-file, it does not even seem to be reading this  
> part of the configuration.

This is working as designed, in Maven the *-file goals are meant to be  
used from the command-line and therefore don't automatically read the  
local pom configuration - however you should be able to use the - 
DpomFile= option to explicitly point to a pom file with the bundle  
details, just like the standard install:install-file goal.

bundle:deploy is for deploying pom artifacts and bundle:deploy-file is  
for deploying non-maven artifacts.

See the end of the bundleplugin docs for an example of the  
bundle:install-file goal.

> If I run it as-is, it complains that I have not specified a URL. If  
> I specify one with -Durl=scp://foo then it complains that I have not  
> given a groupId, artifactId, version, or packaging. Yet, with the  
> same POM, deploy:bundle clearly successfully reads a value from the  
> remoteOBR portion of this configuration section just fine.
>
> (For the record, I have also tried absolutely specifying groupId,  
> artifactId, version, and packaging in the POM, with no change in  
> result.)
>
> Any idea what I might be doing wrong?
>
> Thanks again,
>
> -Richard
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


deploy:bundle vs. deploy:bundle-file

Posted by Richard Feldman <rt...@bjc.org>.
I have the following structure in my POM:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
                <remoteOBR>repository.xml</remoteOBR>
                <url>scp://foo</url>
                <groupId>${groupId}</groupId>
                <artifactId>${artifactId}</artifactId>
                <version>${version}</version>
                <packaging>${packaging}</packaging>

...

This works great for deploy:bundle, which updates repository.xml (or anything else I change that to) remotely just fine. However, when I run deploy:bundle-file, it does not even seem to be reading this part of the configuration.

If I run it as-is, it complains that I have not specified a URL. If I specify one with -Durl=scp://foo then it complains that I have not given a groupId, artifactId, version, or packaging. Yet, with the same POM, deploy:bundle clearly successfully reads a value from the remoteOBR portion of this configuration section just fine.

(For the record, I have also tried absolutely specifying groupId, artifactId, version, and packaging in the POM, with no change in result.)

Any idea what I might be doing wrong?

Thanks again,

-Richard



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: configuration of bundle using web console

Posted by Paulo Sergio <pa...@gmail.com>.
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 <fm...@gmail.com>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 <fmeschbe@gmail.com
> >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: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: configuration of bundle using web console

Posted by Felix Meschberger <fm...@gmail.com>.
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 <fm...@gmail.com>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: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: configuration of bundle using web console

Posted by Paulo Sergio <pa...@gmail.com>.
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?

regards,
paulo f

On Fri, Jan 16, 2009 at 7:03 PM, Felix Meschberger <fm...@gmail.com>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: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: configuration of bundle using web console

Posted by Felix Meschberger <fm...@gmail.com>.
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: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org