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

Closed connnections not returning to pool

 
Inder Singh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I wrote a simple test program to check if the closed connections are returned to POOL. I am using websphere 5.1.1.3. In one of the classes I am opening 20 connections, and immediately closing 19 connections and doing some processing with one connection to read data from DB2 and wait for 10 mins (using wait(600000)). I set pool param to be: 'Unused timeout=180 secs', max connections=25, min connections=1, Aged time out=0....Note that I am using Data Source to get the connections. Everything is working fine except that the connections are not released until wait time is finished (i.e. 10 mins or 600000 milli secs). Alos note that I set the reaptime as 18 secs (it is too low but for testing I used this). I am using Tivoli performance viewer to monitor the connection i the pool and DB2. I use this class (servlet) and start from a browser.

Help me if there is anything I am doing wrong. Thanks...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Inder,
Welcome to JavaRanch!

Are you expecting the connections to be put back in the pool or removed from the pool?
 
Inder Singh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I am expecting the connections to be returned to the pool as I closed the connection using conn.close() method. Later these connections may be removed from pool based on unused timeout setting in websphere. But these are never returned to the pool until my wait time of 10 mins elapses in spite of closing the connections within few secs of opening.How do I know these were not returned to pool? I am using Tivoli performnce viewer(TPW). I see these are returned to pool just after wait time and I see that in TPW. It is strange.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic