Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [corona-dev] Problem with auto starting bundles if they are on different start level.

OSGI R4 core spec 
section 8.2.6 below indicates that the framework cannot activate a
bundle if it is the framework current start level is lower than a bundle
start level. Maybe this covers the situation you describe:

====
If a bundle is started by calling the Bundle.startmethod, then the OSGi
Framework must mark the bundle as persistently started. The OSGi
Framework
must not actually start a bundle when the active start level is less
than
the bundle's start level. In that case, the state must not change.

====

The OSGI R4 core spec has a whole chapter on Start Level Service 
( Chapter 8 )

Glenn Everitt

-----Original Message-----
From: corona-dev-bounces@xxxxxxxxxxx
[mailto:corona-dev-bounces@xxxxxxxxxxx] On Behalf Of Marcin Okraszewski
Sent: Monday, January 15, 2007 10:22 AM
To: Corona development; Murphree, Michael
Subject: [corona-dev] Problem with auto starting bundles if they are on
different start level.

I think I found my problem why a bundle doesn't start eventhough one of 
its classes is accessed.

I did a small experiment - plugins attached. It is as fallows:
1. There are two plugins: bundle1 and bundl2.
2. bundle1 exposes a "TestClass" class which, which as a method 
"doIt()", that prints "true" if bundle1 is started or "false" if not.
3. bundle1 has the "Eclipse-LazyStart: true", which should cause bundle 
start if one of its classes is loaded
4. bundle2 in its activator creates a new instance of TestClass and 
invokes the doIt() method.
4.a) Normally we would expect that doIt() prints "true".
5. Run an OSGi applicataion "budle_startup_test" ; you will see it 
prints "false"

The problem is that "bundle1" is at start level 4, while "bundle2" is at

start level 1. If they are at the same start level it works as expected.

Do you know if it should be like this? Does OSGi spec says so?

Marcin
The contents of this e-mail are intended for the named addressee only.
It contains information that may be confidential. Unless you are the
named addressee or an authorized designee, you may not copy or use it,
or disclose it to anyone else. If you received it in error please notify
us immediately and then destroy it. 


Back to the top