You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Sangjin Lee (JIRA)" <ji...@apache.org> on 2007/11/21 01:43:43 UTC

[jira] Created: (GERONIMO-3617) AsyncHttpClient should support retries on connection failures

AsyncHttpClient should support retries on connection failures
-------------------------------------------------------------

                 Key: GERONIMO-3617
                 URL: https://issues.apache.org/jira/browse/GERONIMO-3617
             Project: Geronimo
          Issue Type: New Feature
      Security Level: public (Regular issues)
          Components: AsyncHttpClient
    Affects Versions: 1.x
            Reporter: Sangjin Lee


AsyncHttpClient should provide a way to support retries if initial connection attempts fail.  There should be a configuration where connection retries are enabled and also the maximum number of attempts is specified.  If these are set, connection attempts should be retried.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-3617) AsyncHttpClient should support retries on connection failures

Posted by "Sangjin Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-3617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552561 ] 

Sangjin Lee commented on GERONIMO-3617:
---------------------------------------

The number of retries would probably be a parameter on the AsyncHttpClient instance itself, as it pertains more to the client app than individual requests.  The default should be 0 (no retries).

The natural place where this would be attempted I think is AsyncHttpClient.FutureListener.  FutureListener is the listener on the connect future.  There one can deal with successful connections as well as failures.

One could maintain the retry count on the FutureListener, and call connect() until the retry count is exhausted.  The FutureListener object could (and probably should) be reused for subsequent retry attempts to keep track of the count.

> AsyncHttpClient should support retries on connection failures
> -------------------------------------------------------------
>
>                 Key: GERONIMO-3617
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3617
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>    Affects Versions: 1.x
>            Reporter: Sangjin Lee
>
> AsyncHttpClient should provide a way to support retries if initial connection attempts fail.  There should be a configuration where connection retries are enabled and also the maximum number of attempts is specified.  If these are set, connection attempts should be retried.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-3617) AsyncHttpClient should support retries on connection failures

Posted by "Sangjin Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sangjin Lee updated GERONIMO-3617:
----------------------------------

    Comment: was deleted

> AsyncHttpClient should support retries on connection failures
> -------------------------------------------------------------
>
>                 Key: GERONIMO-3617
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3617
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>    Affects Versions: 1.x
>            Reporter: Sangjin Lee
>
> AsyncHttpClient should provide a way to support retries if initial connection attempts fail.  There should be a configuration where connection retries are enabled and also the maximum number of attempts is specified.  If these are set, connection attempts should be retried.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (GERONIMO-3617) AsyncHttpClient should support retries on connection failures

Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick McGuire resolved GERONIMO-3617.
------------------------------------

    Resolution: Fixed
      Assignee: Rick McGuire

Committed revision 605288. 

> AsyncHttpClient should support retries on connection failures
> -------------------------------------------------------------
>
>                 Key: GERONIMO-3617
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3617
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>    Affects Versions: 1.x
>            Reporter: Sangjin Lee
>            Assignee: Rick McGuire
>         Attachments: 3617.patch
>
>
> AsyncHttpClient should provide a way to support retries if initial connection attempts fail.  There should be a configuration where connection retries are enabled and also the maximum number of attempts is specified.  If these are set, connection attempts should be retried.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-3617) AsyncHttpClient should support retries on connection failures

Posted by "Sangjin Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-3617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549143 ] 

Sangjin Lee commented on GERONIMO-3617:
---------------------------------------

I have a patch ready that addresses this issue and also GERONIMO-3616.

Essentially the sendRequest() method is modified to return a ResponseFuture instead of void.  In addition, an overloaded version of sendRequest() is created to take an additional argument of BlockingQueue<ResponseFuture>.  The queue will serve as a completion queue on which a ResponseFuture object will be added as the request is complete.

The semantics is entirely analogous to a familiar java.util.concurrent.CompletionService, although I thought creating a concrete CompletionService implementation was an overkill.

I have also created a test class that exercises the new method.

I'll be uploading the patch...


> AsyncHttpClient should support retries on connection failures
> -------------------------------------------------------------
>
>                 Key: GERONIMO-3617
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3617
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>    Affects Versions: 1.x
>            Reporter: Sangjin Lee
>
> AsyncHttpClient should provide a way to support retries if initial connection attempts fail.  There should be a configuration where connection retries are enabled and also the maximum number of attempts is specified.  If these are set, connection attempts should be retried.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-3617) AsyncHttpClient should support retries on connection failures

Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick McGuire updated GERONIMO-3617:
-----------------------------------

    Attachment: 3617.patch

I believe this patch will give you what you'd like to do.  I'm not terribly happy with the unit tests I wrote for this, since the retries are transparent to the using code.  With the current test infrastructure, I was only able to test retries that failed through all of the attempts.  Not really sure how to get a test that will eventually succeed on a connection retry. 

> AsyncHttpClient should support retries on connection failures
> -------------------------------------------------------------
>
>                 Key: GERONIMO-3617
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3617
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>    Affects Versions: 1.x
>            Reporter: Sangjin Lee
>         Attachments: 3617.patch
>
>
> AsyncHttpClient should provide a way to support retries if initial connection attempts fail.  There should be a configuration where connection retries are enabled and also the maximum number of attempts is specified.  If these are set, connection attempts should be retried.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (GERONIMO-3617) AsyncHttpClient should support retries on connection failures

Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick McGuire closed GERONIMO-3617.
----------------------------------


> AsyncHttpClient should support retries on connection failures
> -------------------------------------------------------------
>
>                 Key: GERONIMO-3617
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3617
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>    Affects Versions: 1.x
>            Reporter: Sangjin Lee
>            Assignee: Rick McGuire
>         Attachments: 3617.patch
>
>
> AsyncHttpClient should provide a way to support retries if initial connection attempts fail.  There should be a configuration where connection retries are enabled and also the maximum number of attempts is specified.  If these are set, connection attempts should be retried.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.