Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Activator.stop() is not called at shutdown of OS (Windows XP)
Activator.stop() is not called at shutdown of OS (Windows XP) [message #334550] Tue, 17 February 2009 07:09 Go to next message
Eclipse UserFriend
Activator.stop() is not called at shutdown of OS (Windows XP). Unless it
is correct?
Re: Activator.stop() is not called at shutdown of OS (Windows XP) [message #334558 is a reply to message #334550] Tue, 17 February 2009 18:36 Go to previous messageGo to next message
Eclipse UserFriend
Ag wrote:
> Activator.stop() is not called at shutdown of OS (Windows XP). Unless it
> is correct?

Probably not called when the user trips over the power cord, either.
Like finalizers and shutdown hooks, I'd suggest not relying on that
method for anything important.
Re: Activator.stop() is not called at shutdown of OS (Windows XP) [message #334561 is a reply to message #334558] Wed, 18 February 2009 01:44 Go to previous messageGo to next message
Eclipse UserFriend
In our situation, in case of power loss, UPS gives to Windows XP command
on shutdown. And how in this case it is correct to finish a plugin?
Re: Activator.stop() is not called at shutdown of OS (Windows XP) [message #334577 is a reply to message #334561] Wed, 18 February 2009 12:15 Go to previous messageGo to next message
Eclipse UserFriend
"Ag " <agop@rostov.ru> wrote in message
news:03fadef6caecaecf0ab5a68e8d21a259$1@www.eclipse.org...
> In our situation, in case of power loss, UPS gives to Windows XP command
> on shutdown.

Not if the user trips over the power cord between the computer and the UPS.
Not if the user forcibly kills the task. Not if the power supply dies.
There are always termination events that cannot be processed.


> And how in this case it is correct to finish a plugin?

What is the action that you need to take on plug-in shutdown? Why can it
not be done earlier? For instance, if you are serializing out some state,
can it be done at the time the state changed (perhaps on a background
thread), rather than waiting till shutdown?

By the way, I'm not saying that shutdown() should not be getting called when
the OS shuts down - perhaps there's a bug there or perhaps that's
intentional, I don't know. I'm just saying that you can't catch all
possible shutdown events on all platforms in all situations, so if your code
depends on that, I think your code cannot be reliable. So if it were me, I
would prefer a design that didn't depend on catching shutdown events at all.
But since I don't know what it is you're trying to do, I don't know how much
of a concern this kind of reliability is for you.
Re: Activator.stop() is not called at shutdown of OS (Windows XP) [message #334608 is a reply to message #334577] Fri, 20 February 2009 02:41 Go to previous messageGo to next message
Eclipse UserFriend
It is necessary for us to finish database procedures correctly.
Re: Activator.stop() is not called at shutdown of OS (Windows XP) [message #334617 is a reply to message #334608] Fri, 20 February 2009 09:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

On 2/20/2009 2:41 AM, Ag wrote:
> It is necessary for us to finish database procedures correctly.
>

As others have said, relying on clean JVM shutdown and OSGi plugin
shutdown is NOT a good strategy for that kind of thing. There is NO WAY
to guarantee clean shutdown of ANY application.

The application and database need to be designed robustly so that
transactions are completed as quickly as possible and don't require
knowing when an application is closing. This is NOT an Eclipse-specific
issue, it is a general robustness issue.

Eric
Re: Activator.stop() is not called at shutdown of OS (Windows XP) [message #334883 is a reply to message #334617] Fri, 06 March 2009 06:23 Go to previous message
Eclipse UserFriend
But the GUI are closed correctly with this situation. Incorrect completion
only plugins. It seems that is not processed for a specific type of
OS-message.
Previous Topic:CNF
Next Topic:Get extension point from plugin..
Goto Forum:
  


Current Time: Tue May 06 13:46:34 EDT 2025

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

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

Back to the top