Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Easier way to start bundles
Easier way to start bundles [message #95033] Wed, 15 August 2007 20:55 Go to next message
Rashmy A is currently offline Rashmy AFriend
Messages: 149
Registered: July 2009
Senior Member
Hi,

I have created some OSGI services and I see that if I setup my runtime as
below, I can get the bundles B1.jar abd B2.jar installed but NOT started.
testsample/
configuration/
config.ini
org.eclipse.osgi_3.3.0.jar
org.eclipse.equinox.common_3.3.0.jar
org.eclipse.update.configurator_3.2.100.jar
plugins/
B1.jar
B2.jar

I have to explicity specify in the config.ini the following entry
"osgitut.movies@start, com.consumer@start" to get the bundles started up. I
am using the service from commandline by invoking -
$> java -jar org.eclipse.osgi_3.2.0.v20060601.jar -application
com.consumer.ConsumerActivator

I am still in 3.2 and have not moved to 3.3 to start using the declarative
services. Is there an alternate way to startup the bundles automatically?
Can I specify something in the bundles B1.jar and B2.jar that will tell the
OSGI framework to not only install the bundle but also start it?

Thanks,
Rashmy
Re: Easier way to start bundles [message #95046 is a reply to message #95033] Wed, 15 August 2007 22:40 Go to previous message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

No, by default bundles are installed and resolved, but not started, unless they are mentioned in an osgi.bundles with a start level.

If you have Eclipse-LazyStart: true (or the 3.3 variant Bundle-ActivationPolicy: lazy) then they will be automatically started if someone accesses a class/resource from that bundle (but not bundle entry). However, if nothing accesses those classes, they won't be started.

If you're running with -application, and you have org.eclipse.equinox.app/org.eclipse.equinox.registry, then it should try and acquire the application which will start them. However, without those bundles, the -application will be ignored.

Alex.
Previous Topic:HTTP-Plugin with dynamic port from configuration?
Next Topic:java.lang.NumberFormatException on equinox jar
Goto Forum:
  


Current Time: Thu Mar 28 07:56:13 GMT 2024

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

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

Back to the top