• Post Reply Bookmark Topic Watch Topic
  • New Topic

will the connection be returned to pool after browser is closed?

 
Subbu Aswathanarayan
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone,
i had a question.i have using connection pool in one of my servlets.i am returning the connection to the pool at the end of the servlet.my question is, if the user closes the browser window before the servlet returns the connection, will the connection be automatically returned to the pool.if not what can i do to ensure that the connection is returned?
i am using dbConnectionBroker to implement connection pooling.
thanks for any help.
Subbu
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the user closes the browser prematurely, you should get an exception. This sounds like a case for having try - catch - finally - where the finally clause cleans up the connection no matter what happens.
Bill
------------------
author of:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!