This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

OSGI: OsgiBundleApplicationContextListener not listening to events from all bundles

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to achieve a use case where I want to read an implementation of a particular interface from all bundles as soon as the bundle is started. So, initially I created a BundleListener and as soon as the bundle is started I tried to read the Osgi service from registry, but it did not work. Because Spring DM extender created the ApplicationContext for the bundle after the bundle is started.

So, I tried another solution where I created an OsgiBundleApplicationContextListener. But for some reason this listener listened to AppContextRefreshed event from only two bundles out of 10 bundles that I have.

Am I missing someting here, how can I receive AppContextRefreshed event from all bundles?

Note: I already posted this on Eclipse/virgo forum but did not get any reply, hence posting here again.

Thanks in advance.
Manish
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Manish

For OSGI to work in spring DM way, the osgi-context.xml where the service beans registered in the OSGI registry are referred, check the beans are rightly referred in the osgi context xml file. the reason i am pointing this is as you said only 2 bundles are listening to events.


thanks,
ketan
 
What's wrong? Where are you going? Stop! Read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!