Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection time out in applets

 
amit tantia
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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.
 
peter johansson
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • 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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic