Recovering a pool of connections
First Claim
1. A method comprising:
- in response to a request, selecting a current connection from a pool, wherein the pool comprises a plurality of connections to a server, wherein a plurality of applications share the pool of the plurality of connections;
deciding whether the current connection is;
if the current connection is stale, determining whether a number of stale connections encountered during a time period is greater than an adaptive threshold;
if the determining is true, performing recovery on all of the plurality of connections in the pool, wherein the performing the recovery on all of the plurality of connections in the pool further comprises sending a ping message to the server on each of the plurality of connections and removing the connections from the pool for which the ping message is unsuccessful;
if the determining is false, performing recovery on the current connection; and
changing the adaptive threshold by an amount specified by a rule if a ration to the number of stale connections to a number of good connections encountered during the time period satisfies a ration comparison statement specified by the rule.
5 Assignments
0 Petitions
Accused Products
Abstract
In an embodiment, in response to a request, a connection is selected from a pool of connections to a server. If the connection is stale and the number of stale connections encountered is greater than an adaptive threshold, then recovery is performed on all of the connections in the pool. If the number of stale connections is not greater than the adaptive threshold, then recovery is performed on the stale connection. A decision is made whether the connection is stale by sending the request to the server via the connection and detecting whether the sending encountered an error and by receiving a response from the server via the current connection and detecting whether the response indicates that the request encountered an error at the server.
-
Citations
16 Claims
-
1. A method comprising:
-
in response to a request, selecting a current connection from a pool, wherein the pool comprises a plurality of connections to a server, wherein a plurality of applications share the pool of the plurality of connections; deciding whether the current connection is; if the current connection is stale, determining whether a number of stale connections encountered during a time period is greater than an adaptive threshold; if the determining is true, performing recovery on all of the plurality of connections in the pool, wherein the performing the recovery on all of the plurality of connections in the pool further comprises sending a ping message to the server on each of the plurality of connections and removing the connections from the pool for which the ping message is unsuccessful; if the determining is false, performing recovery on the current connection; and changing the adaptive threshold by an amount specified by a rule if a ration to the number of stale connections to a number of good connections encountered during the time period satisfies a ration comparison statement specified by the rule. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer-readable storage medium encoded with instructions, wherein the instructions when executed comprise:
-
in response to receiving a request, selecting a current connection from a pool, wherein the pool comprises a plurality of connections to a server, wherein a plurality of applications share the pool of the plurality of connections; deciding whether the current connection is stale; if the current connection is stale, determining whether a number of stale connections encountered during a time period is greater than an adaptive threshold;
if the determining is true, performing recovery on all of the plurality of connections in the pool, wherein the performing the recovery on all of the plurality of connections in the pool further comprises sending a ping message to the server on each of the plurality of connections and removing the connections from the pool for which the ping message is unsuccessful;if the determining is false, performing recovery on only the current connection; and changing the adaptive threshold by an amount specified by a rule if a ratio of the number of stale connections to a number of good connections encountered during the time period satisfies a ratio comparison statement specified by the rule. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A method for configuring a computer, comprising:
-
configuring the computer to, in response to receiving a request, select a current connection from a pool, wherein the pool comprises a plurality of connections to a server, wherein a plurality of applications share the pool of the plurality of connections; configuring the computer to decide whether the current connection is stale; configuring the computer to, if the current connection is stale, determine whether a number of stale connections encountered during a time period is greater than an adaptive threshold; configuring the computer to, if the determining is true, perform recovery on all of the plurality of connections in the pool, wherein the configuring the computer to perform the recovery on all of the plurality of connections in the pool further comprises configuring the computer to send a ping message to the server on each of the plurality of connections and configuring the computer to remove the connections from the pool for which the ping message is unsuccessful; configuring the computer to, if the determining is false, perform recovery on only the current connection; and configuring the computer to change the adaptive threshold by an amount specified by a rule if a ratio of the number of stale connections to a number of good connections encountered during the time period satisfies a ratio comparison statement specified by the rule and to change the adaptive threshold by the amount specified in the rule if the adaptive threshold satisfies a threshold comparison statement specified by the rule. - View Dependent Claims (14, 15, 16)
-
Specification