Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning 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

when osgi dependency is not running

 
Ranch Hand
Posts: 8934
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens when bundle1 dependent on bundle2 is shutdown. Will runtime exception be thrown ? One more question, if changes are made to argument passed to bundle 2 from bundle 1 I guess it wont get reflected in the caller's object, I mean is it similar to RMI calls ?
 
author
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Pradeep bhatt wrote:What happens when bundle1 dependent on bundle2 is shutdown. Will runtime exception be thrown ? One more question, if changes are made to argument passed to bundle 2 from bundle 1 I guess it wont get reflected in the caller's object, I mean is it similar to RMI calls ?



Regarding your first question, code dependencies are not impacted by whether a bundle is active or not. Once a code dependency is satisfied it will remain satisfied until the framework is shutdown or refreshed. You cannot just go pull the rug out from under a bundle by taking away its required classes. Service dependencies, on the other hand, can go away dynamically and a bundle must be prepared to deal with it. This is similar to distributed programming where remote services can fail for any reason.

Regarding your second question, even though I compare services to distributed computing above, I am only talking about how failure can occur at any time, nothing else. There is nothing special or magical about OSGi services, they are just direct objects shared among bundles and behave just like any normal object would.
 
You ridiculous clown, did you think you could get away with it? This is my favorite 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!