Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 3429 invoked from network); 27 Oct 2010 09:40:57 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Oct 2010 09:40:57 -0000 Received: (qmail 38075 invoked by uid 500); 27 Oct 2010 09:40:56 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 38009 invoked by uid 500); 27 Oct 2010 09:40:54 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 38001 invoked by uid 99); 27 Oct 2010 09:40:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Oct 2010 09:40:54 +0000 X-ASF-Spam-Status: No, hits=4.5 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,SPF_HELO_PASS,SPF_SOFTFAIL,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of rastaman.3@hotmail.fr does not designate 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Oct 2010 09:40:47 +0000 Received: from sam.nabble.com ([192.168.236.26]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1PB2Ub-0006gP-Hv for users@cxf.apache.org; Wed, 27 Oct 2010 02:40:25 -0700 Date: Wed, 27 Oct 2010 02:40:25 -0700 (PDT) From: Djoser To: users@cxf.apache.org Message-ID: <1288172425537-3238427.post@n5.nabble.com> Subject: Pool of instances exceeds maximum instance count MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello, I have developed a standalone web service with CXF and it's currently running in production. When there are lots of requests simultaneously, the response time of the service is sometimes too long (it rarely happens though). So I'm trying to create a pool of 10 instances. The problem is that although I specify a maximum value of 10 instances in the org.apache.cxf.service.invoker.PooledFactory constructor, the service creates an instance for each request, regardless of the maximum value. If 20 requests arrive at the same time, 20 instances are created. I absolutely need to limit the number of instances. Is there something wrong in my code ? Factory factory = new PerRequestFactory(XpcmsResponder.class); factory = new PooledFactory(factory, 10, false); JAXWSMethodInvoker invoker = new JAXWSMethodInvoker(factory); JaxWsServerFactoryBean factoryBean = new JaxWsServerFactoryBean(); factoryBean.setAddress(XPCMS_RESPONDER_ADDRESS); factoryBean.setServiceClass(XpcmsResponder.class); factoryBean.setInvoker(invoker); factoryBean.create(); Regards, Djoser -- View this message in context: http://cxf.547215.n5.nabble.com/Pool-of-instances-exceeds-maximum-instance-count-tp3238427p3238427.html Sent from the cxf-user mailing list archive at Nabble.com.