From users-return-149666-apmail-tomcat-users-archive=tomcat.apache.org@tomcat.apache.org Fri Aug 11 07:12:17 2006 Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 22874 invoked from network); 11 Aug 2006 07:12:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Aug 2006 07:12:17 -0000 Received: (qmail 75881 invoked by uid 500); 11 Aug 2006 07:12:07 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 75404 invoked by uid 500); 11 Aug 2006 07:12:05 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 75393 invoked by uid 99); 11 Aug 2006 07:12:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Aug 2006 00:12:05 -0700 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [206.190.39.87] (HELO web50015.mail.yahoo.com) (206.190.39.87) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 11 Aug 2006 00:11:55 -0700 Received: (qmail 7374 invoked by uid 60001); 11 Aug 2006 07:11:27 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=moMAWJeMb2fQ/GxmUWzuuewsuVehpxrQJHeVqvswFZRZ/DPD9L0+oLv6LwWhdMaYXPvypAsSgQ2qgpGGOkzsaIZy1/odI8JFLuSWxGIYHiVhkKGbQkks0TK+PoYgJdk6wg8kKghLRb+fd4hsTgqAVouGy2j9HEOIO0gzEBjuq2I= ; Message-ID: <20060811071127.7372.qmail@web50015.mail.yahoo.com> Received: from [24.4.102.57] by web50015.mail.yahoo.com via HTTP; Fri, 11 Aug 2006 00:11:27 PDT Date: Fri, 11 Aug 2006 00:11:27 -0700 (PDT) From: Bob Hall Subject: Re: [OT] how to over come toomanyconnection error when communicatingMYSQL To: Tomcat Users List In-Reply-To: <203d357e0608102345v114448e5kd70a69ad86dd396f@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --- prakash shanmugam wrote: > hai all, > i have one major issue in my project.. > My project is developed using jsp,servlets in > Tomcat5 with MySql as > database.. i am using type1 driver > My project is now used by end users in intranet.. > When multiple users are accessing at the same time > ,its throwing too many > connections exception at sometimes . And at > sometimes its dispaying error as > "Operation not allowed after ResultSet is closed" > i dont know how to rectify this .. Can anybody help > me to overcome this.. Prakash, Your code has to be reworked to be usable. As written, users are "stepping on one another" in too many places to list. You should take a look at a fairly robust example and rewrite your code accordingly. Guidelines: (see example) - Connection, Statement, ResultSet vars must have method scope - obtain, use, and close a Connection in a single method - after your application is successfully supporting multiple users look into using a Connection pool to improve performance Example: -Bob __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org