[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472227#comment-13472227
 ] 

Dominique Jäggi commented on HTTPCLIENT-1238:
---------------------------------------------

upon further consideration, i would like to create a third patch (making the 
previous two patches completely obsolete). the current approach has issues:
* setting a proxy selector via a java.net.ProxySelector#setDefault() in the 
OSGi bundle is dangerous:
** it sets the proxy selector JVM-wide, not only in the context of the 
application
** if multiple instances of httpcomponents are used within the JVM, they 
overwrite each other's proxy selectors
* a transparent, central proxy configuration should also be supported outside 
the context of OSGi (and not only via system properties - an obsolete way)

thus the suggestions for the next patch are:
* introduce central proxy configuration facility (setting of multiple proxies) 
- move proxy selection code from httpclient-osgi to httpclient
* central proxies can be configured outside OSGi (method to be determined)
* if running in an OSGi context, the OSGi bundle provides a configuration 
bridge to the OSGi configuration admin proxy configurations
* configurations are looked for in the sequence: OSGi (if in container) - 
non-OSGi configuration - system properties 
* patch HttpClientBuilder to use a central proxy selector (non 
java.net.ProxySelector), using configurations from sequence above, setting 
proxies and proxy authentication

as such please disregard the most recent attache patch and let me know your 
thoughts.
                
> Contribute Bundle Activator And Central Proxy Configuration
> -----------------------------------------------------------
>
>                 Key: HTTPCLIENT-1238
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1238
>             Project: HttpComponents HttpClient
>          Issue Type: Wish
>          Components: HttpClient
>    Affects Versions: 4.2.1
>            Reporter: Dominique Jäggi
>            Priority: Minor
>             Fix For: 4.3 Final
>
>         Attachments: HTTPCLIENT-1238-2.patch, HTTPCLIENT-1238.patch
>
>
> as discussed at [0] i'd like to contribute the bundle activator and central 
> proxy configuration.
> the attached patch may need some cleanup on your side, as only assumed 
> locations where to put some classes or in which pom.xml to put dependencies.
> i kindly ask you to review the patch in if possible integrate it in a future 
> release.
> Adobe (and i as its employee) is available for assistance, explanations, or 
> further dev work required in the context of the patch.
> [0] 
> http://mail-archives.apache.org/mod_mbox/hc-dev/201209.mbox/%3cCACMijv-21S4+Jw_A=jdfhevb9cmt4kni5p3jahzfh3kvu4b...@mail.gmail.com%3e

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to