Expand my Community achievements bar.

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;//...}
1 Reply

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;//...}
page footer