> From: Christopher Schultz [mailto:ch...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to