How i can declare a parameter in the OSGi bundle configuration be required or mandatory? - Develop OSGi bundle to extend core functionality | Community
Skip to main content
tnguyenv
Level 2
October 16, 2015
Solved

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

  • October 16, 2015
  • 1 reply
  • 1678 views

Hi everyone,

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

Thanks,

Tung

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sam205505050

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

Sam205505050Accepted solution
Level 6
October 16, 2015

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