|
From: Christian N. <chr...@em...> - 2004-05-19 10:31:52
|
----- Original Message ----- From: Craig Servin <cs...@cr...> Date: Tue, 18 May 2004 22:50:06 -0500 To: pro...@li... Subject: Re: [Proxool-developer] Connection Equality > On Tuesday 18 May 2004 15:56, Bill Horsman wrote: > > However, I wonder whether it will cause problems with some systems. > > Christian, some of your/my code relies on being able to identify the > > same connection being used in a Map doesn't it? Any thoughts? > > It is a little bit strange to have equals() guarantee that it is the same > connection. I usually count on equals() to tell me something about logical > equality and == to see if something is really the same object. Your points are valid, but in pratice this will create problems for external code that wants to reuse resources tied to a connection. For example: We use a lot of clobs. Instead of creating a new clob each time we call our procedures (up to 40 times a second) we tie a clob to a connection and reuse the same clob each time. This is done by simply using the connection as the key in a thread safe hash map. So, for this reason I suggest that the wrapper uses the identity of the underlying connection. CHR CHR -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm |