Re: how to finish a java applet when I change of url in IExplorer
From: Andrew Thompson (SeeMySites_at_www.invalid)
Date: 02/05/05
- Next message: Steve Horsley: "Re: Synchronize with sockets"
- Previous message: Vijay: "Struts: difference between ....??"
- In reply to: Sebastian Scheid: "Re: how to finish a java applet when I change of url in IExplorer"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 05 Feb 2005 12:56:41 GMT
On Sat, 5 Feb 2005 11:54:58 +0100, Sebastian Scheid wrote:
> "davidgrs" <davidgrs@gmail.com> schrieb im Newsbeitrag
> news:1107533710.720107.67560@l41g2000cwc.googlegroups.com...
>>I have a problem with a java applet that has inside a thread, when I
>> change of page, the java applet is still runing, and then when I load
>> another page tha cotaints this java applet, I have two instances
>> running in my internet explorer.
>>
>> I am aware of this because my java application uses tcp sockets
>> communications, and the tcp activity is still alive when I changed of
>> paged in the Internet Explorer.
>
> Did you override the stop()-method? You should stop the communication and
> the thread there. Be aware that stop is called when loading another page,
> quitting the browser or minimizing the browser window.
Be aware that while compatible browser/VM combinations are
*supposed* to call the stop() method on page exit, many don't.
You can never absolutely rely on stop() being called.
To the OP. You might be able to get around this problem by
applying the singleton design pattern here. Only one instance
of the applet will exit in any one VM.
Of course, if a browser choses to load mulitple VM's, all bets are
off, and you are better off to check for the original socket being
occupied to trigger an error/information message.
-- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane
- Next message: Steve Horsley: "Re: Synchronize with sockets"
- Previous message: Vijay: "Struts: difference between ....??"
- In reply to: Sebastian Scheid: "Re: how to finish a java applet when I change of url in IExplorer"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|