0

I have studied the Websphere document "Connection Life Cycle" for Websphere Application Server Express v6.1 and and have searched the web for an answer to the following.

Connection Pool State

  1. Pretest existing pooled connection is selected - retry interval is zero seconds
  2. Pretest new connections is selected - # of retries is zero and retry interval is 0
  3. Pretest SQL String is "Select 'Hello' from dual"

What happens if the pretest fails and

  1. There are no connections in the inFreePool or InUse state?
  2. There are connections in the inFreePool state?

I'm referring to the settings in "Data sources > data_source > Websphere Application Server data source"

Mark Glass
  • 386
  • 1
  • 7
  • 15

1 Answers1

0

application calls getConnection

  1. If there is a connection inFreePool then it is tested using pretest SQL string and handed to the application if it passes the test.
    1. If it fails the test the pool is purged according to the Purge policy.
      1. If the purge policy is EntirePool then the entire free pool is purged and a new connection is acquired and tested.
      2. If purge policy is failingConnectionOnly then the failing connection is discarded and another connection is obtained from the pool and tested.
      3. If there are no connections in the pool then a new connection is created and tested. If the new connection fails then an exception (Type?) is thrown.

  2. If there are no connections in the free pool then a new connection is created, tested and handed to the application if it passes the test. If the new connection fails then an exception is thrown.
Mark Glass
  • 386
  • 1
  • 7
  • 15