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

How i can declare a parameter in the OSGi bundle configuration be required or mandatory? - Develop OSGi bundle to extend core functionality

Avatar

Level 2

Hi everyone,

How i can declare a parameter in the OSGi bundle configuration be required or mandatory?

Thanks,

Tung

1 Accepted Solution

Avatar

Correct answer by
Level 6

Hi Tung,

 

Have you tried this -

@Component @Providespublic class MyComponent implements MyService { @ServiceProperty(name="username", mandatory=true)private String m_username; @Property(name="password", mandatory=true)private String m_password;//...}

View solution in original post

0 Replies

Avatar

Correct answer by
Level 6

Hi Tung,

 

Have you tried this -

@Component @Providespublic class MyComponent implements MyService { @ServiceProperty(name="username", mandatory=true)private String m_username; @Property(name="password", mandatory=true)private String m_password;//...}