Patent ID: 7337226

Claim:
A method for dynamically sizing one or more session pools, each of the one or more session pools comprising one or more sessions, the session pools residing on a server in an n-tier computing architecture, the method comprising: requesting, by a client, a free session from a first session pool of the server in the n-tier computing architecture, wherein the first session pool comprises one or more sessions that connect to a database server, the first session pool is managed by a middle tier server, and one or more clients access the one or more sessions that connect to the database server from the middle tier server; determining whether the free session is immediately available in the first session pool to be assigned; in response to determining that the free session is available from the first session pool, assigning the free session to the client; in response to determining that the free session is not available from the first session pool, determining whether a new session can be created in the first session pool; in response to determining that the new session can permissively be created, creating the new session in the first session pool and assigning the new session in the first session pool to the client; in response to determining that the new session cannot be created, determining whether an identified session from a second session pool can be de-allocated; if there are no sessions from the second session pool that can be de-allocated, causing the client request to wait; and if the identified session from the second session pool can be de-allocated, dynamically sizing the first and second session pools by de-allocating the identified session from the second session pool, creating a new session in the first session pool and assigning the new session in the first session pool to the client.