US2006102665A1PendingUtilityA1

Retry of methods based on exception type and method type

Assignee: IBMPriority: Nov 12, 2004Filed: Nov 12, 2004Published: May 18, 2006
Est. expiryNov 12, 2024(expired)· nominal 20-yr term from priority
G06F 9/4812G06F 2209/481
44
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

A method, apparatus, system, and signal-bearing medium that, in an embodiment, determine whether a method that attempted to use a connection to a resource is retryable based on an exception type and a method type specified in configuration data. If the method is retryable, a rollback operation is issued to the resource, a new connection to the resource is attempted, and the method is retried on the new connection. If the method is not retryable, an exception is sent to a client that requested the method. In an embodiment, the method has an associated number of maximum retries and a time period to wait between retries. In this way, clients are relieved of the burden of recovering from the failure of connections to resources.

Claims

exact text as granted — not AI-modified
1 . A method comprising: 
 detecting an exception encountered by a method using a connection;    determining whether the method is retryable based on configuration data, wherein the configuration data comprises an identification of an exception type and a method type;    attempting a new connection to the resource if the method is retryable; and    retrying the method via the new connection if the method is retryable.    
   
   
       2 . The method of  claim 1 , wherein the determining further comprises: 
 determining whether a number of retries is less than a maximum for the method.    
   
   
       3 . The method of  claim 1 , further comprising: 
 sending an exception to a client that requested the method if the method is not retryable.    
   
   
       4 . The method of  claim 1 , wherein the detecting further comprises: 
 searching an exception chain for the source of the exception.    
   
   
       5 . An apparatus comprising: 
 means for detecting an exception encountered by a method using a connection;    means for determining whether the method is retryable based on configuration data, wherein the configuration data comprises an identification of an exception type and a method type;    means for issuing a rollback to the resource if the method is retryable;    means for attempting a new connection to the resource if the method is retryable; and    means for retrying the method via the new connection if the method is retryable.    
   
   
       6 . The apparatus of  claim 5 , wherein the means for determining further comprises: 
 means for determining whether a number of retries is less than a maximum for the method.    
   
   
       7 . The apparatus of  claim 5 , further comprising: 
 means for sending an exception to a client that requested the method if the method is not retryable.    
   
   
       8 . The apparatus of  claim 5 , wherein the exception indicates that the resource is unreachable.  
   
   
       9 . A signal-bearing medium encoded with instructions, wherein the instructions when executed comprise: 
 deciding whether a connection to a resource is stale;    determining whether a method that attempted to use the connection is retryable if the connection is stale based on configuration data associated with the method;    issuing a rollback to the resource if the method is retryable;    attempting a new connection to the resource if the method is retryable;    retrying the method via the new connection if the method is retryable; and    sending an exception to a client that requested the method if the method is not retryable.    
   
   
       10 . The signal-bearing medium of  claim 9 , wherein the determining further comprises: 
 determining whether a number of retries is less than a maximum for the method.    
   
   
       11 . The signal-bearing medium of  claim 9 , wherein the connection to the resource is stale if the resource is unreachable.  
   
   
       12 . The signal-bearing medium of  claim 9 , further comprising: 
 waiting for a time period before retrying the method.    
   
   
       13 . A computer system comprising: 
 a processor; and    a main memory encoded with instructions, wherein the instructions when executed on the processor comprise: 
 deciding whether a connection to a resource is stale,  
 determining whether a method that attempted to use the connection is retryable if the connection is stale based on configuration data associated with the method,  
 issuing a rollback to the resource if the method is retryable,  
 attempting a new connection to the resource if the method is retryable,  
 retrying the method via the new connection if the method is retryable, and  
 sending an exception to a client that requested the method if the method is not retryable.  
   
   
   
       14 . The computer system of  claim 13 , wherein the determining further comprises: 
 determining whether a number of retries is less than a maximum for the method.    
   
   
       15 . The computer system of  claim 13 , wherein the connection to the resource is stale if the resource is closed.  
   
   
       16 . The computer system of  claim 13 , further comprising: 
 waiting for a time period before retrying the method.    
   
   
       17 . A method for configuring a computer, comprising: 
 configuring the computer to detect an exception encountered by a method using a connection;    configuring the computer to determine whether the method is retryable based on configuration data, wherein the configuration data comprises an identification of an exception type and a method type;    configuring the computer to attempt a new connection to the resource if the method is retryable; and    configuring the computer to retry the method via the new connection if the method is retryable.    
   
   
       18 . The method of  claim 17 , wherein the configuring the computer to determine further comprises: 
 configuring the computer to determine whether a number of retries is less than a maximum for the method.    
   
   
       19 . The method of  claim 17 , further comprising: 
 configuring the computer to send an exception to a client that requested the method if the method is not retryable.    
   
   
       20 . The method of  claim 17 , wherein the configuring the computer to detect further comprises: 
 configuring the computer to search an exception chain for the source of the exception.

Join the waitlist — get patent alerts

Track US2006102665A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.