• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Connection time out in applets

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> > We have developed a chat applet which polls the servlet for values
> > every 10 seconds. now, here is the problem...when it is polling there
> > are no issues ..however if I click on the applet to begin a
> > conversation with someone else and if at that point the server looses
> > internet connection...the applet hangs..because it is not able to
> > establish a connection with the server. Now, after 2-3 minutes, the
> > applet does return to its normal state because probably the browser
> > tells the applet that the connection is lost. However, 2-3 minutes is
> > a very long time and is there some way I can tell the applet to wait
> > for 10-15 seconds to look for a connection and if not found...simply
> > flag a message...connection lost. any help in programming this
> > connection time out would be highly appreciated.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
When you have several tasks that is done at the same time(you have the applet polling a servlet for values and at the same time requesting actions within your applet) Try to query the servlet for values in a separate process. Thus, start a new thread for this task.
regards,
/Peter

Originally posted by amit tantia:
> > We have developed a chat applet which polls the servlet for values
> > every 10 seconds. now, here is the problem...when it is polling there
> > are no issues ..however if I click on the applet to begin a
> > conversation with someone else and if at that point the server looses
> > internet connection...the applet hangs..because it is not able to
> > establish a connection with the server. Now, after 2-3 minutes, the
> > applet does return to its normal state because probably the browser
> > tells the applet that the connection is lost. However, 2-3 minutes is
> > a very long time and is there some way I can tell the applet to wait
> > for 10-15 seconds to look for a connection and if not found...simply
> > flag a message...connection lost. any help in programming this
> > connection time out would be highly appreciated.


 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic