tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Question about resetting datasources and changes to the BasicDataSource.close() method
Date Fri, 01 Jun 2012 16:23:11 GMT
> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
> Subject: Re: Question about resetting datasources and changes to the BasicDataSource.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 fiddling with is not in an undefined
state.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL 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 attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message