Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Handling bundle lifecycle?
Handling bundle lifecycle? [message #33399] Thu, 14 June 2007 14:15 Go to next message
Aaron Siri is currently offline Aaron SiriFriend
Messages: 11
Registered: July 2009
Junior Member
What is the expected behavior when a running bundle that defines
extension points is stopped? For example, let's say I have a plugin
that defines a perspective and two views. When I stop the plugin from
the Equinox console I'd expect the perspective and views to disappear.
I'd also expect the perspective and views to become available when I
restart the bundle/plugin.

Is there defined behavior in these situations?

-Aaron
Re: Handling bundle lifecycle? [message #33895 is a reply to message #33399] Mon, 18 June 2007 10:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

From what I understand it is the responsibility of the plug-in to clean
up when shut down. This would include to close and release e.g. views
that are implemented by the plug-in.

But with RAP, due to its distributed nature, I doubt that this is an
easy task if ever possible at all.
Imagine a view that is opened from several sessions, then the plug-in is
shut down. And here lies problem: to close all instances of that view
and in addition realize that change client-side, you would need a
running request for every session the view is used in.

For a view to become available when a plug-in is started should be
possible. As we mainly copied the RCP Workbench code this works if it is
implemented there.

Rüdiger


Aaron Siri wrote:
> What is the expected behavior when a running bundle that defines
> extension points is stopped? For example, let's say I have a plugin
> that defines a perspective and two views. When I stop the plugin from
> the Equinox console I'd expect the perspective and views to disappear.
> I'd also expect the perspective and views to become available when I
> restart the bundle/plugin.
>
> Is there defined behavior in these situations?
>
> -Aaron
Re: Handling bundle lifecycle? [message #33924 is a reply to message #33895] Mon, 18 June 2007 15:03 Go to previous message
Aaron Siri is currently offline Aaron SiriFriend
Messages: 11
Registered: July 2009
Junior Member
It seems like you'd need to implement support for it in the ViewManager
(in the case of views.) It would have to detect if a bundle is being
stopped and then close/affect all of the extensions that it registered.
It is probably easier to do in a more pure OSGi environment (i.e.
using OSGi services vs. the registry/plugin.xml infrastructure) but
seems like it should be possible (I'm doing it in a custom
Eclipse-like framework that I have been working - a contingency if RAP
wasn't far enough along. Probably won't be an issue. ;)

-Aaron

Rüdiger Herrmann wrote:
> From what I understand it is the responsibility of the plug-in to clean
> up when shut down. This would include to close and release e.g. views
> that are implemented by the plug-in.
>
> But with RAP, due to its distributed nature, I doubt that this is an
> easy task if ever possible at all.
> Imagine a view that is opened from several sessions, then the plug-in is
> shut down. And here lies problem: to close all instances of that view
> and in addition realize that change client-side, you would need a
> running request for every session the view is used in.
>
> For a view to become available when a plug-in is started should be
> possible. As we mainly copied the RCP Workbench code this works if it is
> implemented there.
>
> Rüdiger
>
>
> Aaron Siri wrote:
>> What is the expected behavior when a running bundle that defines
>> extension points is stopped? For example, let's say I have a plugin
>> that defines a perspective and two views. When I stop the plugin from
>> the Equinox console I'd expect the perspective and views to disappear.
>> I'd also expect the perspective and views to become available when I
>> restart the bundle/plugin.
>>
>> Is there defined behavior in these situations?
>>
>> -Aaron
Previous Topic:how to start unit test inside the ide since RAP M4
Next Topic:Editor support ported
Goto Forum:
  


Current Time: Tue Jul 16 00:23:04 GMT 2024

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

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

Back to the top