You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Roland Weber (JIRA)" <ji...@apache.org> on 2007/02/20 16:53:05 UTC

[jira] Created: (HTTPCLIENT-636) Revise internal data structures of ThreadSafeClientConnManager

Revise internal data structures of ThreadSafeClientConnManager
--------------------------------------------------------------

                 Key: HTTPCLIENT-636
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-636
             Project: HttpComponents HttpClient
          Issue Type: Improvement
          Components: HttpConn
            Reporter: Roland Weber
             Fix For: 4.0 Final


ThreadSafeClientConnManager internal data structures can be improved:
- use wait/notify instead of Thread.interrupt() to unblock waiting threads
- keep track of issued connections with weak references
- use class derived from WeakReference instead of a lookup table for callbacks from ReferenceThread
  (or drop ReferenceThread in favor of occasionally polling the issued connections for leaks)


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


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Closed: (HTTPCLIENT-636) Revise internal data structures of ThreadSafeClientConnManager

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

Roland Weber closed HTTPCLIENT-636.
-----------------------------------

    Resolution: Fixed

Done. The connection pool, now a separate class, no longer keeps a hard reference to the connection manager.
The pool keeps a weak reference to the manager to detect GC. In that case, the pool shuts itself down.


> Revise internal data structures of ThreadSafeClientConnManager
> --------------------------------------------------------------
>
>                 Key: HTTPCLIENT-636
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-636
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpConn
>            Reporter: Roland Weber
>            Assignee: Roland Weber
>             Fix For: 4.0 Alpha 2
>
>
> ThreadSafeClientConnManager internal data structures can be improved:
> - keep track of issued connections with weak references
> - use class derived from WeakReference instead of a lookup table for callbacks from ReferenceThread
>   (or drop ReferenceThread in favor of occasionally polling the issued connections for leaks)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Commented: (HTTPCLIENT-636) Revise internal data structures of ThreadSafeClientConnManager

Posted by "Roland Weber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514671 ] 

Roland Weber commented on HTTPCLIENT-636:
-----------------------------------------

next steps:
- move TSCCM to a separate package
- factor out some of the inner classes


> Revise internal data structures of ThreadSafeClientConnManager
> --------------------------------------------------------------
>
>                 Key: HTTPCLIENT-636
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-636
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpConn
>            Reporter: Roland Weber
>            Assignee: Roland Weber
>             Fix For: 4.0 Alpha 2
>
>
> ThreadSafeClientConnManager internal data structures can be improved:
> - keep track of issued connections with weak references
> - use class derived from WeakReference instead of a lookup table for callbacks from ReferenceThread
>   (or drop ReferenceThread in favor of occasionally polling the issued connections for leaks)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Commented: (HTTPCLIENT-636) Revise internal data structures of ThreadSafeClientConnManager

Posted by "Roland Weber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514455 ] 

Roland Weber commented on HTTPCLIENT-636:
-----------------------------------------

Replacing the shared cleanup thread with a per-pool thread raises some tricky issues.
The first attempt failed because the background thread prevents GC of the connection manager:
the thread keeps a reference to the ConnectionPool, which is a nested class of the TSCCM.

Will need to think about this a little more. Suggestions are welcome.

cheers,
  Roland


> Revise internal data structures of ThreadSafeClientConnManager
> --------------------------------------------------------------
>
>                 Key: HTTPCLIENT-636
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-636
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpConn
>            Reporter: Roland Weber
>            Assignee: Roland Weber
>             Fix For: 4.0 Alpha 2
>
>
> ThreadSafeClientConnManager internal data structures can be improved:
> - keep track of issued connections with weak references
> - use class derived from WeakReference instead of a lookup table for callbacks from ReferenceThread
>   (or drop ReferenceThread in favor of occasionally polling the issued connections for leaks)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Updated: (HTTPCLIENT-636) Revise internal data structures of ThreadSafeClientConnManager

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

Roland Weber updated HTTPCLIENT-636:
------------------------------------

    Fix Version/s:     (was: 4.0 Final)
                   4.0 Alpha 2
         Assignee: Roland Weber
      Description: 
ThreadSafeClientConnManager internal data structures can be improved:
- keep track of issued connections with weak references
- use class derived from WeakReference instead of a lookup table for callbacks from ReferenceThread
  (or drop ReferenceThread in favor of occasionally polling the issued connections for leaks)


  was:
ThreadSafeClientConnManager internal data structures can be improved:
- use wait/notify instead of Thread.interrupt() to unblock waiting threads
- keep track of issued connections with weak references
- use class derived from WeakReference instead of a lookup table for callbacks from ReferenceThread
  (or drop ReferenceThread in favor of occasionally polling the issued connections for leaks)



this will go into an extra issue:
- use wait/notify instead of Thread.interrupt() to unblock waiting threads


> Revise internal data structures of ThreadSafeClientConnManager
> --------------------------------------------------------------
>
>                 Key: HTTPCLIENT-636
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-636
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpConn
>            Reporter: Roland Weber
>            Assignee: Roland Weber
>             Fix For: 4.0 Alpha 2
>
>
> ThreadSafeClientConnManager internal data structures can be improved:
> - keep track of issued connections with weak references
> - use class derived from WeakReference instead of a lookup table for callbacks from ReferenceThread
>   (or drop ReferenceThread in favor of occasionally polling the issued connections for leaks)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org