The websphere 6.1 application server and Oracle 10g database on our site have a firewall between with timeout of about 3 hours. The database datasource usage is purely based on user access which is restricted to working days (weekdays only). This causes the first call on the monday morning to return staleconnection (as firewall has disconnected it). My requirement is to honor the first request
in case of staleconnection or pool being empty or otherwise (the first call will purge and recreate the pool).
Connection timeout - 180 seconds
Maximum connections - 100 connections
Minimum connections - 1 connections
Reap time seconds - 180 seconds
Unused timeout - 1800 seconds
Aged timeout - 0 seconds
Purge policy - EntirePool
To remedy this the minimum connection was reduced to 0. The above datasource connection timeouts are kept at installation defaults, whereas purge policy is updated to entirepool.
Here are a few questions I would like to ask regards to websphere connection pool.
1. Does test connection on websphere console affect connection timeout (resets it?) / affect pool (clears the staleconnections?)
2. If minimum connection size is reduced to 0, will the first connection request be returned as exception, triggering pool cleanup OR will the first request wait till pool is created assuming no delay on DB.
Do I require code change to retry connection in case of exception.
3. All the connection timeouts are within 30 mins, so after 30 mins of inactivity will the connection pools be 0, if so causing issue 2.
4. Is there any concept of keepalive database connection to get away with this entire configuration mess. I could set a connection keepalive setting for every say 2 hours to avoid firewall drops.
(5.) Even when my min pool size was 1, I am still confused why it gave staleconnection as the connections should have gone long from the pool. Is aged timeout to be used here with specific value?
Would appreciate even if the answers are yes/no format wihtout explanation.