Just to make sure I understand: You are saying " effectively renders PoolingHttpClientConnectionManager's pooling capabilities almost useless."
Because EJBs themselves are in a pool and the threads accessing those are managed by the J2EE server (So no need to hold a pool per EJB instance), or do you mean that the PoolingHttpClientConnectionManager itself invokes threads and thus not suitable for EJB3.1 spec? Although I plan to use the HTTP client in EJB3.1 container I am not using it within an EJB instance, but I am using it within a singleton Instance of one of my classes. Thanks! Guri On Mon, Dec 8, 2014 at 9:54 AM, Ronen Morecki <[email protected]> wrote: > Thank you Oleg for your prompt reply. > > Just to make sure I understand: > You are saying " effectively renders PoolingHttpClientConnectionManager's > pooling capabilities almost useless." > > Because EJBs themselves are in a pool and the threads accessing those are > managed by the J2EE server (So no need to hold a pool per EJB instance), or > do you mean that the PoolingHttpClientConnectionManager itself invokes > threads and thus not suitable for EJB3.1 spec? > > Although I plan to use the HTTP client in EJB3.1 container I am not using > it within an EJB instance, but I am using it within a singleton Instance of > one of my classes. > > > > > *Best regards,* > > > *Ronen Morecki* > * CTO* | *ZooZ* > > *__________________________**_____**_____**__**____* > > > > zooz.com <http://www.zooz.com/> > > > > > From: Guri Livne <[email protected]> > Date: Sunday, December 7, 2014 at 7:38 PM > To: Benny Zangiri <[email protected]>, Ronen Morecki <[email protected]> > Subject: Fwd: Re: Using PoolingHttpClientConnectionManager in EJB > container > > Do you understand the answer? > ---------- הודעה שהועברה ---------- > מאת: "Oleg Kalnichevski" <[email protected]> > תאריך: 7 בדצמ׳ 2014 16:16 > נושא: Re: Using PoolingHttpClientConnectionManager in EJB container > אל: "HttpClient User Discussion" <[email protected]> > עותק: > > On Sun, 2014-12-07 at 10:34 +0200, Guri Livne wrote: > > - We want to use HttpClient inside EJB container of Glassfish 3.1 Open > > source edition. > > - In HttpClient documentation > > < > http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html> > > we > > see the following line regarding BasicHttpClientConnectionManager: > "This > > connection manager implementation should be used inside an EJB > container". > > - There is no such line in PoolingHttpClientConnectionManager > > documentation. > > - Can we use PoolingHttpClientConnectionManager in EJB container? > > - If not - can you explain why? > > > > You can but explicit thread management when running inside an EJB > container is prohibited by the EJB 3.1 spec, which effectively renders > PoolingHttpClientConnectionManager's pooling capabilities almost > useless. > > Oleg > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
