Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » BundleActivation
BundleActivation [message #463425] Mon, 12 February 2007 04:03 Go to next message
Eclipse UserFriend
Hi,

I just discovered that my bundle is not activated when I don't mark it
"Eclipse-LazyStart: true". This is not what I expected. I thought if I
don't add this flag the bundle is activated automatically when the
workbench/application is started up. This is with 3.3M4 because I didn't
had time to upgrade to M5. Can anybody explain me whether this is a
missconception on my side or a bug.

Tom
Re: BundleActivation [message #463427 is a reply to message #463425] Mon, 12 February 2007 04:43 Go to previous messageGo to next message
Eclipse UserFriend
Tom Schindl wrote:
> Hi,
>
> I just discovered that my bundle is not activated when I don't mark it
> "Eclipse-LazyStart: true". This is not what I expected. I thought if I
> don't add this flag the bundle is activated automatically when the
> workbench/application is started up. This is with 3.3M4 because I didn't
> had time to upgrade to M5. Can anybody explain me whether this is a
> missconception on my side or a bug.
>
> Tom
If you do not provide Eclipse-LazyStart: true then you are responsible
for starting your plugin. There is no automatic startup mechanism unless
you say so.

Regards
Stefan
Re: BundleActivation [message #463429 is a reply to message #463427] Mon, 12 February 2007 04:48 Go to previous messageGo to next message
Eclipse UserFriend
Ah. Ok so I should have activated the bundle my own using equinox
directly right? Thanks for the info.

Tom

Stefan Langer schrieb:
> Tom Schindl wrote:
>> Hi,
>>
>> I just discovered that my bundle is not activated when I don't mark it
>> "Eclipse-LazyStart: true". This is not what I expected. I thought if I
>> don't add this flag the bundle is activated automatically when the
>> workbench/application is started up. This is with 3.3M4 because I
>> didn't had time to upgrade to M5. Can anybody explain me whether this
>> is a missconception on my side or a bug.
>>
>> Tom
> If you do not provide Eclipse-LazyStart: true then you are responsible
> for starting your plugin. There is no automatic startup mechanism unless
> you say so.
>
> Regards
> Stefan
Re: BundleActivation [message #463431 is a reply to message #463429] Mon, 12 February 2007 06:16 Go to previous messageGo to next message
Eclipse UserFriend
Correct! There is someway of specifiing if the bundle should be started
right at the start but I can't remember the name of the parameter. Try
searching for runlevel or startlevel in the docs if you are interested
in it.

Stefan

Tom Schindl wrote:
> Ah. Ok so I should have activated the bundle my own using equinox
> directly right? Thanks for the info.
>
> Tom
>
> Stefan Langer schrieb:
>> Tom Schindl wrote:
>>> Hi,
>>>
>>> I just discovered that my bundle is not activated when I don't mark it
>>> "Eclipse-LazyStart: true". This is not what I expected. I thought if I
>>> don't add this flag the bundle is activated automatically when the
>>> workbench/application is started up. This is with 3.3M4 because I
>>> didn't had time to upgrade to M5. Can anybody explain me whether this
>>> is a missconception on my side or a bug.
>>>
>>> Tom
>> If you do not provide Eclipse-LazyStart: true then you are responsible
>> for starting your plugin. There is no automatic startup mechanism unless
>> you say so.
>>
>> Regards
>> Stefan
Re: BundleActivation [message #463435 is a reply to message #463431] Mon, 12 February 2007 06:49 Go to previous messageGo to next message
Eclipse UserFriend
I'm not sure if I understand what you meant very well. But you may look
here:
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. platform.doc.isv/reference/extension-points/org_eclipse_ui_s tartup.html
Is it what you were looking for?

regards,
Jakub Jurkiewicz

Stefan Langer wrote:
> Correct! There is someway of specifiing if the bundle should be started
> right at the start but I can't remember the name of the parameter. Try
> searching for runlevel or startlevel in the docs if you are interested
> in it.
>
> Stefan
>
> Tom Schindl wrote:
>> Ah. Ok so I should have activated the bundle my own using equinox
>> directly right? Thanks for the info.
>>
>> Tom
>>
>> Stefan Langer schrieb:
>>> Tom Schindl wrote:
>>>> Hi,
>>>>
>>>> I just discovered that my bundle is not activated when I don't mark it
>>>> "Eclipse-LazyStart: true". This is not what I expected. I thought if I
>>>> don't add this flag the bundle is activated automatically when the
>>>> workbench/application is started up. This is with 3.3M4 because I
>>>> didn't had time to upgrade to M5. Can anybody explain me whether this
>>>> is a missconception on my side or a bug.
>>>>
>>>> Tom
>>> If you do not provide Eclipse-LazyStart: true then you are responsible
>>> for starting your plugin. There is no automatic startup mechanism unless
>>> you say so.
>>>
>>> Regards
>>> Stefan
Re: BundleActivation [message #463439 is a reply to message #463435] Mon, 12 February 2007 07:55 Go to previous messageGo to next message
Eclipse UserFriend
No that is not what I meant. There is a OSGI equivalent for Startup at
least in 4.1 (as far as I remember but then again it might be that
memory is failing on me ;) )

Jakub Jurkiewicz wrote:
> I'm not sure if I understand what you meant very well. But you may look
> here:
> http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. platform.doc.isv/reference/extension-points/org_eclipse_ui_s tartup.html
>
> Is it what you were looking for?
>
> regards,
> Jakub Jurkiewicz
>
> Stefan Langer wrote:
>> Correct! There is someway of specifiing if the bundle should be
>> started right at the start but I can't remember the name of the
>> parameter. Try searching for runlevel or startlevel in the docs if you
>> are interested in it.
>>
>> Stefan
>>
>> Tom Schindl wrote:
>>> Ah. Ok so I should have activated the bundle my own using equinox
>>> directly right? Thanks for the info.
>>>
>>> Tom
>>>
>>> Stefan Langer schrieb:
>>>> Tom Schindl wrote:
>>>>> Hi,
>>>>>
>>>>> I just discovered that my bundle is not activated when I don't mark it
>>>>> "Eclipse-LazyStart: true". This is not what I expected. I thought if I
>>>>> don't add this flag the bundle is activated automatically when the
>>>>> workbench/application is started up. This is with 3.3M4 because I
>>>>> didn't had time to upgrade to M5. Can anybody explain me whether this
>>>>> is a missconception on my side or a bug.
>>>>>
>>>>> Tom
>>>> If you do not provide Eclipse-LazyStart: true then you are responsible
>>>> for starting your plugin. There is no automatic startup mechanism
>>>> unless
>>>> you say so.
>>>>
>>>> Regards
>>>> Stefan
Re: BundleActivation [message #463463 is a reply to message #463425] Mon, 12 February 2007 09:35 Go to previous messageGo to next message
Eclipse UserFriend
Tom Schindl wrote:
> Hi,
>
> I just discovered that my bundle is not activated when I don't mark it
> "Eclipse-LazyStart: true". This is not what I expected. I thought if I
> don't add this flag the bundle is activated automatically when the
> workbench/application is started up. This is with 3.3M4 because I didn't
> had time to upgrade to M5. Can anybody explain me whether this is a
> missconception on my side or a bug.

Just general notes:

Like was mentioned in the thread already, lazy start set to true will
cause eclipse to try and automatically start your bundle the first time
some other part of eclipse tries to load a class from it. The most
common cause is some part of eclipse calls
IConfigurationElement#createExecutableExtension(*) to work with a
contributed extension.

org.eclipse.ui.startup asks the workbench to run your IStartup class
(make sure it's not your Plugin class) in a separate thread after the
workbench has been restored. We generally discourage its use for early
activation, especially for plugins that have UI requirements, but
sometimes it is necessary.

The other way that was mentioned is asking OSGi to start your plugin.
One option is to have something call Bundle#start() on your Bundle
object. But anything started this way will be restarted by OSGi when it
comes up ... which can cause problems if the Bundle has dependencies on
org.eclipse.ui stuff like the workbench. That means you would need to
figure out a way to control your bundle lifecycle yourself.

OSGi startup is also controlled by the osgi.bundles property (you can
find the default eclipse one in eclipse/configuration/config.ini).

Activating your plugin is always exciting in the eclipse world :-)

Later,
PW
Re: BundleActivation [message #463501 is a reply to message #463463] Mon, 12 February 2007 16:14 Go to previous message
Eclipse UserFriend
Originally posted by: lamont_gilbert.rigidsoftware.com

On Mon, 12 Feb 2007 09:35:06 -0500, Paul Webster wrote:

> Tom Schindl wrote:
>> Hi,
>>
>> I just discovered that my bundle is not activated when I don't mark it
>> "Eclipse-LazyStart: true". This is not what I expected. I thought if I
>> don't add this flag the bundle is activated automatically when the
>> workbench/application is started up. This is with 3.3M4 because I didn't
>> had time to upgrade to M5. Can anybody explain me whether this is a
>> missconception on my side or a bug.
>
> Just general notes:
>
> Like was mentioned in the thread already, lazy start set to true will
> cause eclipse to try and automatically start your bundle the first time
> some other part of eclipse tries to load a class from it. The most common
> cause is some part of eclipse calls
> IConfigurationElement#createExecutableExtension(*) to work with a
> contributed extension.
>

For me the most common way is through instantiation of a class that
resides in the bundle, by a class in a different bundle.
Previous Topic:Updating non-java code via Update Manager: Possible?
Next Topic:Sofware Updates of my application
Goto Forum:
  


Current Time: Tue Mar 18 10:49:26 EDT 2025

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

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

Back to the top