Expand my Community achievements bar.

SOLVED

multivalued osgi configuration

Avatar

Level 4

hi,

i am working on osgi custom configuration.

but i want to use same service multiple times like we have same format for jdbc configuration and we provide multiple db configs.

1564703_pastedImage_0.png

is it possible to create custom multivalued configuration ?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

I believe you are using osgi annotations, then you can do it like below

@Designate(ocd = DemoConfig.class,factory=true)

https://osgi.org/javadoc/r6/cmpn/org/osgi/service/metatype/annotations/Designate.html



Arun Patidar

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi,

I believe you are using osgi annotations, then you can do it like below

@Designate(ocd = DemoConfig.class,factory=true)

https://osgi.org/javadoc/r6/cmpn/org/osgi/service/metatype/annotations/Designate.html



Arun Patidar