Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-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 8521C9202 for ; Fri, 1 Jun 2012 16:24:37 +0000 (UTC) Received: (qmail 36822 invoked by uid 500); 1 Jun 2012 16:24:34 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 36756 invoked by uid 500); 1 Jun 2012 16:24:34 -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 36743 invoked by uid 99); 1 Jun 2012 16:24:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2012 16:24:34 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Chuck.Caldarale@unisys.com designates 216.82.254.211 as permitted sender) Received: from [216.82.254.211] (HELO mail201.messagelabs.com) (216.82.254.211) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2012 16:24:23 +0000 X-Env-Sender: Chuck.Caldarale@unisys.com X-Msg-Ref: server-10.tower-201.messagelabs.com!1338567839!9798556!6 X-Originating-IP: [192.61.61.105] X-StarScan-Version: 6.5.10; banners=-,-,- X-VirusChecked: Checked Received: (qmail 8328 invoked from network); 1 Jun 2012 16:24:00 -0000 Received: from naedge.unisys.com (HELO USEA-NAEDGE2.unisys.com) (192.61.61.105) by server-10.tower-201.messagelabs.com with RC4-SHA encrypted SMTP; 1 Jun 2012 16:24:00 -0000 Received: from usea-nahubcas2.na.uis.unisys.com (129.224.76.115) by USEA-NAEDGE2.unisys.com (192.61.61.105) with Microsoft SMTP Server (TLS) id 8.3.83.0; Fri, 1 Jun 2012 11:23:12 -0500 Received: from USEA-EXCH8.na.uis.unisys.com ([129.224.76.41]) by usea-nahubcas2.na.uis.unisys.com ([129.224.76.115]) with mapi; Fri, 1 Jun 2012 11:23:12 -0500 From: "Caldarale, Charles R" To: Tomcat Users List Date: Fri, 1 Jun 2012 11:23:11 -0500 Subject: RE: Question about resetting datasources and changes to the BasicDataSource.close() method Thread-Topic: Question about resetting datasources and changes to the BasicDataSource.close() method Thread-Index: Ac1AEh5C9AeSlv9jRCizCl0kZvaNGQAAF11g Message-ID: <99C8B2929B39C24493377AC7A121E21FB028D31026@USEA-EXCH8.na.uis.unisys.com> References: <30A8B1E10B6694429B87D8D9FBF45C8E024EB9EC8261@Exchange02.rainhail.com> <30A8B1E10B6694429B87D8D9FBF45C8E024EB9EC8270@Exchange02.rainhail.com> <4FC7C5F2.2000007@christopherschultz.net> <30A8B1E10B6694429B87D8D9FBF45C8E024EB9EC828A@Exchange02.rainhail.com> <4FC7EF38.2090006@christopherschultz.net> <30A8B1E10B6694429B87D8D9FBF45C8E024EB9EC8298@Exchange02.rainhail.com> <4FC8EB18.4040106@christopherschultz.net> In-Reply-To: <4FC8EB18.4040106@christopherschultz.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 > From: Christopher Schultz [mailto:chris@christopherschultz.net]=20 > Subject: Re: Question about resetting datasources and changes to the Basi= cDataSource.close() method > Locking "this" makes sure that the thread's local copy of > whatever-you-are-getting is updated properly and not stale-cached. If > you synchronize the setter, it is a very good idea to synchronize the > getter too. Also, unless you're absolutely certain that the entity being retrieved is a= primitive type, you must synchronize to insure that the structure you're f= iddling with is not in an undefined state. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MA= TERIAL and is thus for use only by the intended recipient. If you received = this in error, please contact the sender and delete the e-mail and its atta= chments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org