Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

OSGI service

ashwiniv2817
Level 2
Level 2

How to use customize parameter instead of URI in osgi service

example :-  protected static final String TEMPLATE = "/apps/example/templates/sampletemplate";

1 Accepted Solution
smacdonald2008
Correct answer by
Level 10
Level 10
0 Replies
smacdonald2008
Level 10
Level 10

Can you explain your use case in more detail please?

Ratna_Kumar
Community Advisor
Community Advisor

Hi,

Can you explain your exact use case, so that further we can help you.

~Ratna Kumar.

ashwiniv2817
Level 2
Level 2

example :-  protected static final String TEMPLATE = "/apps/example/templates/sampletemplate";

"/apps/example/templates/sampletemplate"----this value I need to get from service by configuring the service with default value.

How to do configuration in service to set the default value.

Thanks for the response.

mallipanchal
Level 2
Level 2

In an OSGI service, You can do the configuration at osgi console for that u need to make your service configuration by setting attribute metatype true in a @component annotation and define the configurable fields

osgi component metatype service data use?

ashwiniv2817
Level 2
Level 2

Thanks for the response.

How to use @property in this case?

smacdonald2008
Correct answer by
Level 10
Level 10