Re: Configurator R7 example

2018-08-06 Thread Carsten Ziegeler
I thought this for two years as well...so don't worry :) But it's actually not needed. The R6 and R7 releases have some great new features for DS and CM. The OSGi blog at https://blog.osgi.org has some posts about new things in R7 Regards Carsten Cristiano Gavião wrote > Humm, interesting... 

Re: Configurator R7 example

2018-08-06 Thread Cristiano
Humm, interesting...  thanks Carsten for correct me... Certainly I will need to upgrade my knowledge on DS and CM again :-D I really thought that in order to use a Factory PID such as "my.fpid~somepid" I would need a factory component. On 06/08/2018 12:20, Carsten Ziegeler wrote: I think t

AW: Configurator R7 example

2018-08-06 Thread Philipp Höfler
s which do all the same security check. Big Thanks! Philipp -Ursprüngliche Nachricht- Von: Carsten Ziegeler Gesendet: Montag, 6. August 2018 17:21 An: users@felix.apache.org; Cristiano ; Philipp Höfler Betreff: Re: Configurator R7 example I think the current @Component annotation is corr

Re: AW: AW: Configurator R7 example

2018-08-06 Thread Cristiano
On 06/08/2018 11:10, Philipp Höfler wrote: I am receiving a rest call with a system id. Based on this id I would like to use the appropriated config from the json file. For example, security check is disabled for system1, but not for system2. The rest endpoint is the same but based on the co

Re: Configurator R7 example

2018-08-06 Thread Carsten Ziegeler
I think the current @Component annotation is correct :) (sorry) If you use factory="..." you will create a component factory as defined in the DS specification - that's in contrast to a component managed by factory configurations (which this example is about). If you managed to get the Map of pro

Re: AW: AW: Configurator R7 example

2018-08-06 Thread Cristiano
On 06/08/2018 11:10, Philipp Höfler wrote: Sorry, pid is probably the wrong word for that. Alias might be more correct. I am talking about the name after the ~ in the configuration file (my.config~system1). In this case I would like to get "system1". Ah, now I understood. I think you won't

Re: Configurator R7 example

2018-08-06 Thread Carsten Ziegeler
ctive:='active'] -> > [Help 1] > > Any ideas, how I can get the pid of the configuration? > > Best, > Philipp > > -Ursprüngliche Nachricht- > Von: Philipp Höfler > Gesendet: Montag, 6. August 2018 13:34 > An: users@felix.apache.org > Betre

AW: AW: Configurator R7 example

2018-08-06 Thread Philipp Höfler
org Betreff: Re: AW: Configurator R7 example Hi, If you do not have a "consumer" component active for the service ISecurityChecker you won't have an instance of it created because the default is to delay the activation until someone request it. In order to test, you can use the imm

Re: AW: Configurator R7 example

2018-08-06 Thread Cristiano
the pid of the configuration? Best, Philipp -Ursprüngliche Nachricht- Von: Philipp Höfler Gesendet: Montag, 6. August 2018 13:34 An: users@felix.apache.org Betreff: AW: Configurator R7 example Thanks for your quick reply. Unfortunately, when setting the policy to required, the whole component won&#x

AW: Configurator R7 example

2018-08-06 Thread Philipp Höfler
#x27;;effective:='active'] -> [Help 1] Any ideas, how I can get the pid of the configuration? Best, Philipp -Ursprüngliche Nachricht- Von: Philipp Höfler Gesendet: Montag, 6. August 2018 13:34 An: users@felix.apache.org Betreff: AW: Configurator R7 example Thanks for your quic

AW: Configurator R7 example

2018-08-06 Thread Philipp Höfler
code. But I don't see what it is ... Philipp -Ursprüngliche Nachricht- Von: Carsten Ziegeler Gesendet: Montag, 6. August 2018 13:08 An: users@felix.apache.org; Philipp Höfler Betreff: Re: Configurator R7 example Atm I'm only guessing, but as you are specifying the conf

Re: Configurator R7 example

2018-08-06 Thread Carsten Ziegeler
(PID) my.config~system1 > Factory Persistent Identifier (Factory PID) my.config > Configuration Binding ? > > test.name System2 > test.securityEnabled true > Configuration

AW: Configurator R7 example

2018-08-06 Thread Philipp Höfler
Configuration Information Persistent Identity (PID) my.config~system2 Factory Persistent Identifier (Factory PID) my.config Configuration Binding ? Any help is appreciated. 😊 Thanks, Philipp -----Ursprüngliche Nachricht- Von: Philipp Höfler Gesen

AW: Configurator R7 example

2018-08-01 Thread Philipp Höfler
pp/rest/rest/ServerInfoControllerImpl.java Thanks -Ursprüngliche Nachricht- Von: Raymond Auge Gesendet: Dienstag, 17. Juli 2018 16:43 An: felix users Betreff: Re: Configurator R7 example On Tue, Jul 17, 2018 at 10:18 AM, Philipp Höfler < philipp.hoef...@pernexas.com> wrote:

AW: Configurator R7 example

2018-07-17 Thread Philipp Höfler
, 17. Juli 2018 16:43 An: felix users Betreff: Re: Configurator R7 example On Tue, Jul 17, 2018 at 10:18 AM, Philipp Höfler < philipp.hoef...@pernexas.com> wrote: > Hallo Ray, > > I am sorry, I do not understand your pseudo code example. > I've modified my test project to s

Re: Configurator R7 example

2018-07-17 Thread Raymond Auge
SyntaxException e1) { // ignore } return "Not Found"; That's practically the whole impl. I hope it helps. - Ray > > Thanks, > Philipp > > -Ursprüngliche Nachricht- > Von: Raymond Auge > Gesendet: Montag

AW: Configurator R7 example

2018-07-17 Thread Philipp Höfler
y/app/rest/rest/ServerInfoControllerImpl.java Thanks, Philipp -Ursprüngliche Nachricht- Von: Raymond Auge Gesendet: Montag, 16. Juli 2018 16:48 An: felix users Betreff: Re: Configurator R7 example On Mon, Jul 16, 2018 at 10:42 AM, David Jencks wrote: > Inline... > > Sent from my iPhone &

Re: Configurator R7 example

2018-07-16 Thread Raymond Auge
Config admin isn’t going to create component instances for you. This is > close to nitpicking, but if you aren’t familiar with who does what even a > little imprecision can be very confusing, at least to me. > Of course you're right David. I was trying to describe effects rather than exact mech

Re: Configurator R7 example

2018-07-16 Thread David Jencks
to nitpicking, but if you aren’t familiar with who does what even a little imprecision can be very confusing, at least to me. Thanks David Jencks > Sincerely, > - Ray > > >> Again, thanks for your help. >> Philipp >> >> >> -Ursprüngliche Nachricht-

Re: Configurator R7 example

2018-07-16 Thread Raymond Auge
p. > Philipp > > > -----Ursprüngliche Nachricht- > Von: Raymond Auge > Gesendet: Freitag, 13. Juli 2018 16:01 > An: felix users > Betreff: Re: Configurator R7 example > > On Fri, Jul 13, 2018 at 4:37 AM, Philipp Höfler < > philipp.hoef...@pernexas.com> wrote: >

AW: Configurator R7 example

2018-07-16 Thread Philipp Höfler
e Nachricht- Von: Raymond Auge Gesendet: Freitag, 13. Juli 2018 16:01 An: felix users Betreff: Re: Configurator R7 example On Fri, Jul 13, 2018 at 4:37 AM, Philipp Höfler < philipp.hoef...@pernexas.com> wrote: > I've tested the factory configuration and I am afraid that my proble

Re: Configurator R7 example

2018-07-13 Thread David Jencks
; >>>>> In each class, that needs access to the config I've a activate and >>>>> modified method with this signature: public void modified(MyConfig >>>> config) >>>>> >>>>> Is the type resolved based on the pid and

Re: Configurator R7 example

2018-07-13 Thread Raymond Auge
; > To summarize: > I basically want to load/use the config, based on a parameter coming with > the request. > If possible at all, I do not want to limit the amount of systems. > Could you imagine any easy solution for that problem? > > > -Ursprüngliche Nachricht- >

AW: Configurator R7 example

2018-07-13 Thread Philipp Höfler
-Ursprüngliche Nachricht- Von: Raymond Auge Gesendet: Donnerstag, 12. Juli 2018 18:23 An: felix users Betreff: Re: Configurator R7 example On Thu, Jul 12, 2018 at 11:58 AM, Philipp Höfler < philipp.hoef...@pernexas.com> wrote: > Right, this is missing. > I added the @Rquire

Re: Configurator R7 example

2018-07-13 Thread Martin Nielsen
I got you right, with ManagedProperties I am not bound to the > primitives > > the default osgi implementation provides, but I can use any Java type. > > > > Up to now, I think I am fine with factory configuration, but probably I > > come back to you in a few weeks, when

Re: Configurator R7 example

2018-07-12 Thread David Jencks
quot;: false} >> >> which is probably not what you intended. >> >> IF what you want is to create N instances of the component, one per >> set of configuration properties, you'd want to use Factory Configurations > like so: >> >> { >>>//

Re: Configurator R7 example

2018-07-12 Thread Martin Nielsen
Anyhow, thanks for your help. I am quite new to all the osgi stuff, but slowly but surely I am getting a picture of it. -Ursprüngliche Nachricht- Von: Martin Nielsen Gesendet: Donnerstag, 12. Juli 2018 19:53 An: users@felix.apache.org Betreff: Re: Configurator R7 example Hello

AW: Configurator R7 example

2018-07-12 Thread Philipp Höfler
@felix.apache.org Betreff: Re: Configurator R7 example Hello everyone I saw ManagedProperties mentioned so now I appear! @Philipp.Hoefler if what you mean by complex types is that you want the configuration admin to return some more advanced types like URLs Files or Dates, then ManagedProperties will

Re: Configurator R7 example

2018-07-12 Thread David Jencks
em2 = {"test.securityEnabled": false, "test.test": false} >> >> which is probably not what you intended. >> >> IF what you want is to create N instances of the component, one per set of >> configuration properties, you'd want to use F

AW: Configurator R7 example

2018-07-12 Thread Philipp Höfler
etreff: Re: Configurator R7 example On Thu, Jul 12, 2018 at 11:58 AM, Philipp Höfler < philipp.hoef...@pernexas.com> wrote: > Right, this is missing. > I added the @RquireConfigurator annotation to the GoGo Command class. > Is that a suitable place for it? > The json is now being loade

Re: Configurator R7 example

2018-07-12 Thread Martin Nielsen
st": false > > }, > > // Second Configuration > >"my.config~system2": > >{ > > "test.securityEnabled": true, > > "test.test": false > >

Re: Configurator R7 example

2018-07-12 Thread Raymond Auge
stems? > Meaning, I do not know the amount of systems at compile time. > > Further, how would the @interface MyConfig annotation look like? > Is it possible to expect an array of MyConfig for the modified(MyConfig[] > configs) method? > > Thanks for your help,

AW: Configurator R7 example

2018-07-12 Thread Philipp Höfler
p, Philipp -Ursprüngliche Nachricht- Von: Raymond Auge Gesendet: Donnerstag, 12. Juli 2018 16:43 An: felix users Betreff: Re: Configurator R7 example Did you add the requirement to your configuration bundle? Require-Capability: osgi.extender; \ filter:="(&(osgi.exten

Re: Configurator R7 example

2018-07-12 Thread Raymond Auge
not > sure, if this is really needed for loading the json? > > Unfortunately, the json is obviously not loaded. > Both values are set to true, according to the default value. > > Do I have to do something in addition to load the json file? > > Thanks, > Philipp > >

AW: Configurator R7 example

2018-07-12 Thread Philipp Höfler
. Both values are set to true, according to the default value. Do I have to do something in addition to load the json file? Thanks, Philipp -Ursprüngliche Nachricht- Von: David Bosschaert Gesendet: Donnerstag, 12. Juli 2018 11:15 An: users@felix.apache.org Betreff: Re: Configurato

Re: Configurator R7 example

2018-07-12 Thread Raymond Auge
Nino, DS has that build in with Component Property types. I'm not sure that's quite what the OP is asking. If I'm not mistaken I think what Philipp is asking for is the ability to have types which go beyond the types defined in Configuration Admin (or for Service Properties). I think the only way

Re: Configurator R7 example

2018-07-12 Thread nino martinez wael
Just use https://github.com/TDC-Netdesign/ManagedProperties On Thu, 12 Jul 2018, 10:55 Philipp Höfler, wrote: > Hi, > > I am searching for a possibility to load complex configurations. > I tried the ConfigurationAdminService, but key value pairs are not > sufficient as I need complex types. > >

Re: Configurator R7 example

2018-07-12 Thread David Bosschaert
Hi Philipp, In the end the configuration specified with the Configurator will end up in OSGi Configuration Admin, so the Configurator is limited to the same types as ConfigAdmin. The Configurator allows complex JSON values to be specified, they will end up as JSON text in Configuration Admin if th

Configurator R7 example

2018-07-12 Thread Philipp Höfler
Hi, I am searching for a possibility to load complex configurations. I tried the ConfigurationAdminService, but key value pairs are not sufficient as I need complex types. Raymond pointed out that I should have a look at the Configurator Specification. https://osgi.org/specification/osgi.cmpn/7.