Terminating an Applet

Discussion in 'Java' started by Ike, Feb 17, 2006.

  1. Ike

    Ike Guest

    I need to update a db table when someone terminates an applet, either by
    going to another web page in that instance of the browswer - OR - when
    someone simply kills the browser.

    Is there a means by which i can be certain to write to this db table when
    someone exits an applet. I have tried Applet.destroy() but that doesnt seem
    to work when someone merely kills the browser. Thanks, Ike
     
    Ike, Feb 17, 2006
    #1
    1. Advertising

  2. Ike

    Chris Smith Guest

    Ike <> wrote:
    > I need to update a db table when someone terminates an applet, either by
    > going to another web page in that instance of the browswer - OR - when
    > someone simply kills the browser.
    >
    > Is there a means by which i can be certain to write to this db table when
    > someone exits an applet. I have tried Applet.destroy() but that doesnt seem
    > to work when someone merely kills the browser. Thanks, Ike


    You need something that can be observed from the outside. Have the
    applet open a network connection back to its server, and put some code
    on the server to send a "heartbeat"... a short network message that
    applet will respond to, verifying that it's still alive. If the
    heartbeat isn't returned of there's an IOException on the socket, then
    the applet is probably gone.

    --
    www.designacourse.com
    The Easiest Way To Train Anyone... Anywhere.

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
     
    Chris Smith, Feb 17, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charles A. Lackman

    Terminating a thread from the main thread

    Charles A. Lackman, Dec 9, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    1,569
    Herfried K. Wagner [MVP]
    Dec 9, 2004
  2. Kristofer Liljeblad

    Terminating a authenticated user

    Kristofer Liljeblad, Jun 30, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    473
    Kristofer Liljeblad
    Jun 30, 2003
  3. Hiren Patel
    Replies:
    2
    Views:
    457
    Hiren Patel
    Feb 1, 2005
  4. darrel

    terminating multiple try/catches

    darrel, Apr 4, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    363
    Eric Newton
    Apr 6, 2005
  5. Georg Andersson

    terminating applet-process

    Georg Andersson, Jun 8, 2004, in forum: Java
    Replies:
    7
    Views:
    2,527
    Andrew Thompson
    Jun 10, 2004
Loading...

Share This Page