Skip to main content



      Home
Home » Eclipse Projects » Equinox » Problem with configurator bundle discovery
Problem with configurator bundle discovery [message #89547] Tue, 05 June 2007 04:53 Go to next message
Eclipse UserFriend
Hi,


I tried to use org.eclipse.update.configurator to automatically
discover and launch the bundles that are present in the equinox root
folder as is specified in equinox site.

The config.ini is the following:

osgi.bundles=org.eclipse.equinox.common@2:start,
org.eclipse.update.configurator@3:start

But when I stat equinox:

java -jar org.eclipse.osgi_3.2.2.R32x_v20070118.jar -console


and if I do:
osgi> ss

I only have three bundles:

0 START system.bundle
1 START org.eclipse.equinox.comon
2 START org.eclipse.update.configurator

What I'm I missing? I've lots of bundles in the root folder along
equinox jar.

Thanks!
Re: Problem with configurator bundle discovery [message #89577 is a reply to message #89547] Tue, 05 June 2007 08:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

What happens if the bundles are all in a subdirectory called 'plugins'?

Alex.
Re: Problem with configurator bundle discovery [message #89788 is a reply to message #89577] Wed, 06 June 2007 04:53 Go to previous messageGo to next message
Eclipse UserFriend
Alex Blewitt wrote:
> What happens if the bundles are all in a subdirectory called 'plugins'?
>
> Alex.

If you put it a plugins directory it works. The info on the site should
be corrected.

Nevertheless the only way to auto start the plugins is by specifying the
in config.ini with the flag: @start , right?

Pedro Silva
Re: Problem with configurator bundle discovery [message #89802 is a reply to message #89788] Wed, 06 June 2007 07:58 Go to previous messageGo to next message
Eclipse UserFriend
Pedro,

Yes, you are right, it seemsthe only way to auto start a bundle is by
declaring it in the config.ini file. I thought you could play games
with start levels but that doesn't seem to hold true per my own testing
and this post on the equinox dev list
( http://dev.eclipse.org/mhonarc/lists/equinox-dev/msg01185.ht ml).

That being said, what I've found that works with this auto discovery
setup is adding another option to the config.ini which explicitly
declares the bundle I need started. So for example I need the registry
started, my config.ini looks like this:

osgi.bundles=\
org.eclipse.equinox.common_3.2.0.v20060603.jar@2:start,\
org.eclipse.update.configurator_3.2.2.R32x_v20070111.jar@3:start,\
plugins/org.eclipse.equinox.registry_3.2.1.R32x_v20060814.jar@4:start

Which forces the registry to start after common & configurator have
already started (and I assume after configurator has installed all the
bundles located in plugins/).

I'm not sure what misinformation you found on the site, but the
quickstart guide located at
http://www.eclipse.org/equinox/documents/quickstart.php helped me get
some simple (if not completely contrived) examples working. It also
covers this issue by stating:

"When the Update configurator bundle starts, it automatically discovers
and installs all the bundles in the plugins directory that is beside the
Equinox JAR. Note that the configurator does not automatically start
these bundles."

-Brett
Re: Problem with configurator bundle discovery [message #89816 is a reply to message #89788] Wed, 06 June 2007 08:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

The configurator will auto-install them, so they'll be marked as RESOLVED in the status list. The extensions will be retgistered, but the bundle won't be started unless you do it.

Normally, Eclipse bundles have 'Eclipse-LazyStart: true' (although the OSGi 4.1 release is supposed to have 'Bundle-ActivationPolicy: lazy' as a synonym. In either of these cases, they only get started when yuo try to acquire a class or resource (but not a bundle entry).

If you want them to be started (say, because you have an app whose bundle activator needs it) then you can either start the 'top' one (which will then cause a series of cascading starts) or list them individually in the config.ini. The purpose of the levels is to bring up dependent bundles first (e.g. make sure the logging is up and running) and then the other ones. You can have multiple at the same level if you want (i.e. bundles that get started at level '2') as opposed to a strict increasing number.

Alex.
Re: Problem with configurator bundle discovery [message #89843 is a reply to message #89816] Wed, 06 June 2007 11:04 Go to previous messageGo to next message
Eclipse UserFriend
Alex,
I assume the extensions are only registered iff the registry bundle is
explicitly started correct in the config.ini (or by some other means)
correct?

-Brett
Re: Problem with configurator bundle discovery [message #89899 is a reply to message #89843] Wed, 06 June 2007 14:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

Any bundle that is successfully RESOLVED will have its extensions registered in the equinox registry. That's why Eclipse is so fast; the menus are populated by consultation from the registry and not blocked on class loadign.

The net effect is that any bundle that is installed by the configurator will have the extensions populated, regardless of whether it's started or not.

(NB there's a fine line between INSTALLED and RESOLVED in the framework; INSTALLED means that it's been noticed, and RESOLVED means that all dependencies are met and ready to roll. So whilst you may think of the extensions as being available to any installed bundle, technically it's those in the RESOLVED state and not INSTALLED state. Anything that remains in the INSTALLED state is missing some kind of dependency and therefore there wouldn't be much point in registering them. That being said, I only assume that the equinox registry looks out for RESOLVED, because INSTALLED doesn't make much sense to listen out for IMNSHO)

Alex
Re: Problem with configurator bundle discovery [message #89929 is a reply to message #89899] Wed, 06 June 2007 16:16 Go to previous message
Eclipse UserFriend
Oh, sure, that makes sense, I guess I didn't realize we were talking
about eclipse proper, I had my head in the raw equinox world where there
is no extension registry unless specifically loaded and started.

I was confused, sorry if I caused any other confusion.


-Brett
Previous Topic:precompiled JSPs
Next Topic:OSGi & DS questions
Goto Forum:
  


Current Time: Wed May 07 23:37:01 EDT 2025

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

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

Back to the top