Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5670BCF40 for ; Fri, 12 Dec 2014 03:36:59 +0000 (UTC) Received: (qmail 66741 invoked by uid 500); 12 Dec 2014 03:36:59 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 66684 invoked by uid 500); 12 Dec 2014 03:36:58 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 66671 invoked by uid 99); 12 Dec 2014 03:36:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Dec 2014 03:36:58 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [68.232.143.95] (HELO esa4.starbucks.iphmx.com) (68.232.143.95) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Dec 2014 03:36:53 +0000 X-IronPort-AV: E=Sophos;i="5.07,561,1413273600"; d="scan'208";a="21812257" Received: from unknown (HELO mail-chd.starbucks.com) ([98.99.251.10]) by esa4.starbucks.iphmx.com with ESMTP/TLS/AES128-SHA; 11 Dec 2014 19:36:32 -0800 Received: from MS01223.starbucks.net ([10.5.11.53]) by ms01176.starbucks.net ([fe80::a0fd:7715:eca8:86d%14]) with mapi id 14.03.0195.001; Thu, 11 Dec 2014 19:36:30 -0800 From: Pete Keyes To: HttpClient User Discussion Subject: Re: Using PoolingHttpClientConnectionManager in EJB container Thread-Topic: Using PoolingHttpClientConnectionManager in EJB container Thread-Index: AQHQEuLrAkjjzMaIWk6UAPlUr+eO+ZyGLjAA//+wqsOABecqgP//jdc6 Date: Fri, 12 Dec 2014 03:36:29 +0000 Message-ID: <1C240508-731F-449E-84FD-28FA6EB10B97@starbucks.com> References: <1418043622.19866.3.camel@apache.org> <73A5D62A-8162-4883-996E-261D13727A82@starbucks.com>,<721ED2A7-CA68-4002-B7A9-F4B30623B020@icloud.com> In-Reply-To: <721ED2A7-CA68-4002-B7A9-F4B30623B020@icloud.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org The strict "not allowed" rule of EJB3.1 was dropped in EJB3.2 specifically = because the rule was essentially bogus.=20 By making it sound so ominous with "not allowed" and promised of broken Web= Apps it made forced people to use servlets instead and for no "real" reaso= n.=20 Accordingly EJB3.2 allows WebApps to create and manage threads with no more= than a simple "warning: do so wisely" which is always good advice ... :-) Sent from my iPhone > On Dec 11, 2014, at 6:35 PM, Shih-liang Chang wr= ote: >=20 > You can wrapped it in a singleton session bean with bean managed concurre= ncy annotation and CDI in other session bean. > Though the thread it created (or maybe there isn't any additional thread = created, I am not sure) is not managed thread thus not suggested in EE envi= ronments. >=20 > Best Regards, > Atkins >=20 >> On Dec 9, 2014, at 12:16 AM, Pete Keyes wrote: >>=20 >> A singleton qualifies for concurrent execution by multiple threads in a = container unless it is write locked.=20 >>=20 >> Sent from my iPhone >>=20 >>>> On Dec 8, 2014, at 5:01 AM, Oleg Kalnichevski wrote= : >>>>=20 >>>> On Mon, 2014-12-08 at 14:31 +0200, Guri Livne wrote: >>>> Just to make sure I understand: >>>> You are saying " effectively renders PoolingHttpClientConnectionManage= r's >>>> pooling capabilities almost useless." >>>>=20 >>>> 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? >>>=20 >>> Not, it does not spawn threads by itself. However, without concurrent >>> request execution PoolingHttpClientConnectionManager has no real >>> advantages over BasicHttpClientConnectionManager. >>>=20 >>> Oleg >>>=20 >>>=20 >>>=20 >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org >>> For additional commands, e-mail: httpclient-users-help@hc.apache.org >>=20 >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org >> For additional commands, e-mail: httpclient-users-help@hc.apache.org >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > For additional commands, e-mail: httpclient-users-help@hc.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org