This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes when osgi dependency is not running Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "when osgi dependency is not running" Watch "when osgi dependency is not running" New topic
Author

when osgi dependency is not running

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

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 ?


Groovy
Richard S. Hall
author
Ranch Hand

Joined: Feb 14, 2011
Posts: 47
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: when osgi dependency is not running
 
Similar Threads
JavaServer Faces 1.0 Part I
accessKey and optionsCollection
resourcebundle
Using more than 1 properties file with Action Form
tomcat problem