Patent ID: 7761502

Claim:
A system which enables applications to connect to database instances using multiple connection pools, and to control switching between the connection pools, comprising: a computer including a processor; a plurality of connection pools at the computer, which are adapted to provide connections from applications to database instances; a multipool manager, which maintains an active connection pool list that indicates currently active connection pools, including periodically verifying dead connection pools to determine whether they should be returned to the active connection pool list, and which selects connections to the database instances using the plurality of connection pools, and performs switching between the connection pools, wherein the multipool manager is adapted to check with the applications, using a callback interface and callbacks, before switching connection pools; a callback handler interface provided by the multipool manager to the applications which allows the applications to register callbacks for events; and wherein, upon an event requiring a possible switch in connection pools, the multipool manager checks with those applications which have registered a callback using the callback handler interface, and wherein said checking includes determining that a desired connection pool is on the active connection list, performing a callback to those applications using a specified callback method, providing an indication to those applications as to the possible switch in connection pools, receiving a response from those applications, indicating one of retrying an existing connection, accepting, or rejecting the switch, and retrying, accepting, or rejecting the switch for those applications to the desired connection pool, as authorized by the application's response.