Re: pooled connection myth
From: David McDivitt (x12code-del_at_del-yahoo.com)
Date: 03/17/05
- Next message: Fran Cottone: "RMI between Java 1.5 and 1.4"
- Previous message: David McDivitt: "Re: pooled connection myth"
- In reply to: Lee Fesperman: "Re: pooled connection myth"
- Next in thread: John C. Bollinger: "Re: pooled connection myth"
- Reply: John C. Bollinger: "Re: pooled connection myth"
- Reply: Lee Fesperman: "Re: pooled connection myth"
- Reply: alin_at_earthling.net: "Re: pooled connection myth"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 17 Mar 2005 14:26:37 -0600
>From: Lee Fesperman <firstsql@ix.netcom.com>
>Subject: Re: pooled connection myth
>Date: Thu, 17 Mar 2005 19:58:04 GMT
>
>David McDivitt wrote:
>>
>> There is much to be gained by reusing known open connection objects, rather
>> than issuing single use connection objects for each request. If connection
>> objects are not modified by using transaction blocks, there's no reason not
>> to share them between threads. The word "pooling" implies this, but pooling
>> itself doesn't do very much. For the most part, all that happens is caching
>> the database user name and password.
>
>As John said, the usefulness of concurrent sharing for connection objects varies by the
>driver. In addition, the Connection object does contain state information. Take a look
>at the various setXXX() methods in java.sql.Connection.
>
>Your assumptions about pooling are not very valid. Other types of resources, including
>threads, are pooled in Java but rarely concurrently. Concurrent use of pooled resources
>would tend to imply that all state be read-only, thus no pooling as such is not needed.
>All you need to do is to keep a common reference (GC will take care of disposing of the
>object when no longer needed). While this isn't absolutely true in all cases, it covers
>most of the interesting ones.
>
>Also, caching of connection properties is just one aspect and will normally include more
>than just user/password. Then there is the very important feature of avoiding the
>overhead of making (and ending) a connection to the db and resultant pressure on
>resources on the server. In addition, some connection pooling software support
>(automatic, hidden) pooling of prepared statements.
>
>Finally, please do not top-post. It's just basic netiquette.
If more functionality is present in the connection manager I want to see it.
I do not want to take it on faith. What you say here does not represent
enough value compared to increased complexity. Shared connections are good.
Pooled connections, are not good, since pooling itself does not accomplish
anything. The only way it can be of value is to intercept close and open
calls and reuse hot connections. This is not being done where I am.
- Next message: Fran Cottone: "RMI between Java 1.5 and 1.4"
- Previous message: David McDivitt: "Re: pooled connection myth"
- In reply to: Lee Fesperman: "Re: pooled connection myth"
- Next in thread: John C. Bollinger: "Re: pooled connection myth"
- Reply: John C. Bollinger: "Re: pooled connection myth"
- Reply: Lee Fesperman: "Re: pooled connection myth"
- Reply: alin_at_earthling.net: "Re: pooled connection myth"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|