Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » questions on bundle and event
questions on bundle and event [message #78841] Mon, 11 December 2006 09:31 Go to next message
Eclipse UserFriend
Originally posted by: godman_polly.yahoo.com

I BundleActivator are required to implement the methods start() and stop().
These 2 methods allows users control the installed bundle explicitly. I
would like to know that is there any method allow user to query the internal
state of the bundle and send controlling command to the bundle?

Besides, I don't what is the different between service and bundle? Both of
them are java objects.

How do i load new modules dynamically without restart the whole program?
Should I just deploy a bundle with a new version?

godman
Re: questions on bundle and event [message #79463 is a reply to message #78841] Mon, 18 December 2006 17:01 Go to previous message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
Godman wrote:
> I BundleActivator are required to implement the methods start() and stop().
> These 2 methods allows users control the installed bundle explicitly. I
> would like to know that is there any method allow user to query the internal
> state of the bundle and send controlling command to the bundle?

The methods Bundle.start and Bundle.stop control starting and stopping a
bundle. When these methods get called the BundleActivator.start/stop
methods are called. There is also a method Bundle.getState that can be
used to see what state a bundle is currently in. Is this what you are
after?

>
> Besides, I don't what is the different between service and bundle? Both of
> them are java objects.

Bundles are the installable unit in OSGi. For anything to be installed
into an OSGi framework it must be packaged into a bundle. A Bundle
(org.osgi.framework.Bundle) is a java interface but the interface
represents a bundle as an installable unit. The Bundle interface is
used to control the lifecycle of the bundle. For example, activation,
deactivation, install, update and uninstall.

OSGi Services implementations are delivered as part of a bundle. When a
bundle is activated its BundleActivator.start method can be used to
register service objects with the service registry. There are also
various declarative ways to offer/require OSGi services using
declarative services, Spring-OSGi, iPOJO etc.

>
> How do i load new modules dynamically without restart the whole program?
> Should I just deploy a bundle with a new version?

It depends on if you are adding new bundles or updating old versions.
If you are adding new bundles then just installing them (using
BundleContext.installBundle should work. If you want to update an
existing bundle then Bundle.update should work for you.

>
> godman
>
>

HTH

Tom
Previous Topic:Problem registering custom ProtocolHandler
Next Topic:Host bundle exists but is unresolved
Goto Forum:
  


Current Time: Fri Apr 26 11:03:29 GMT 2024

Powered by FUDForum. Page generated in 0.02630 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top