Skip to main content

stopping the current application forcefully.

4 replies [Last post]
sam_azaz
Offline
Joined: 2007-10-07

Hi,
Is it possible that a current application closes itself forcefully ?
If yes, then how ?
Thanks in advance
Sam

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
billf
Offline
Joined: 2004-02-13

> Hi,
> Is it possible that a current application closes
> itself forcefully ?
> Sam

HI Sam,

It depends on what you mean by "forcefully." An xlet can request its own destruction via notifyDestroyed(), but its still responsible for cleaning up after itself (deregistering listeners, causing any threads it has created to exit, etc.).

See the HD Cookbook page 16-3, "Xlet Termination". That section goes into some detail about arranging for the termination of xlet-created worker threads. MHP clause 11.7.1.2 has some words on what an xlet needs to do to exit cleanly.

Cheers,

Bill

sam_azaz
Offline
Joined: 2007-10-07

Hi there,
Well, I am trying to use org.dvb.application.AppProxy.stop() from the application to close itself. Is it the right way ? Or I should just notify destroyed on pressing some button that will destroy the application. Please suggest.
Thanks in advance
Sam

Bill Foote

bd-j-dev@mobileandembedded.org wrote:
> Hi there,
> Well, I am trying to use org.dvb.application.AppProxy.stop() from the application to close itself. Is it the right way ?

No. I mean, I suppose it would work, but XletContext.notifyDestroyed()
is simpler to use, and has the same effect.

No matter which API you use to notify the application management
system, you're still responsible for the normal xlet cleanup actions.

Cheers,

Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

sam_azaz
Offline
Joined: 2007-10-07

Thanks Bill :)
It is solved.