hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: HttpComponents in the Context Of OSGI-based CMS
Date Fri, 28 Sep 2012 16:00:56 GMT
On Fri, 2012-09-28 at 13:17 +0100, Dominique Jaeggi wrote:
> hi
> On Thu, Sep 27, 2012 at 4:42 PM, Oleg Kalnichevski <olegk@apache.org> wrote:
> > > - do you agree that a central proxy configuration capability
> > >   in the context of OSGi would benefit httpcomponents?
> >
> > I think so, as long as it is not specific to a particular OSGi container
> it is not specific to a particular OSGi container.
> >
> > > - do you have any hints or ideas how the shutdown feature could
> > >   be implemented?
> > >
> >
> > Connection manager shutdown should work exactly the same way in HC 4.x
> > as in HC 3.1. What kind of difficulties are you having with the new
> > API?
> in HC 3.1 there was a static method
>     MultiThreadedHttpConnectionManager.shutdownAll();
> that would shutdown all open connections based on this concrete
> connection manager.
> in HC 4 there doesn't seem to be a similar static method that would
> shutdown connections of multiple active clients. in order for the OSGi
> bundle to cleanly and timely shut down, the suggestion is to shut down
> all active client connections. how to get at those in HC 4?

Oh. It has been so long since I touched HC 3.1 last time that I
completely forgot that static method existed. 

HC 4.x does not have any static data so it could be safely used in
managed environments without standing a risk of one application shutting
down connection managers that belong to another application or doing
something equally silly and destructive.

We could introduce something similar, a sort of tracking for all
connection managers (probably through weak references) but only when
running inside an OSGi container. 

> > We would happily accept such a contribution given that we have rather
> > limited resources to work on things that are not directly related to
> > HTTP.
> i have created [0] for the contribution and attached an initial patch.
> it may require cleanup as you may have different ideas about in which
> package to put classes or in which pom to put dependencies. it also
> still contains a TODO in the activator class regarding above mentioned
> shutdown question. also, the activator would have to be put in the
> osgi bundle's metadata.
> if you require more work in the context of the patch, i have the time
> and resources.

Please see my comments in HTTPCLIENT-1238



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

View raw message