Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't close connection object

 
s choukse
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello forum
I am havig a problem regarding closing the connection object.
I am dealing with jsp's and working on J2ee server so i dont have the option for Connection pool. I have made a bean which takes care ffor the connection . The problem arises when user directly kills the browser window at tha time i am not left with any option to close connection. And i run out of connections supported by the server if the number of user increase.
Please help me regarding this.

------------------
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could have your bean implement the HttpSessionBindingListener interface and add it to the session. Then when the session times out your bean will be notified and you can close the connection.
Doesn't your J2EE implementation provide a connection pool function?
Bill

------------------
author of:
 
s choukse
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No it does not Bill.
saurabh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic