1

How to get OSGI service from Spring-DM?


like, Spring Bean.. ApplicationContext.getBean(id)...

usobject
  • 45
  • 3

1 Answers1

0

Inject it using xml like below

 <osgi:reference id="contactDAOService" interface="com.javaworld.sample.osgi.spring.contact.ContactDAO"/>

Then you can even get it from the application context. Better though inject it into another bean.

Christian Schneider
  • 19,420
  • 2
  • 39
  • 64