Re: [INTERFACES] multiple db connections
Re: [INTERFACES] multiple db connections
От:
"John Frailey" <john@ecstreet.com>
Дата:
>On Mon, 8 Mar 1999, John Frailey wrote: > >> We are trying to port our pure java e-commerce software to postgres. I >> am using database pooling with jdbc during an init stage of the main >> servlet that dishes out the html content to the users. (we must use >> pooling, because it takes too darn long to get a connection, and we >> need our web pages to respond quickly) >> > Very well written db pool class can be obtained at http://javaexchange.com/ has been very reliable for us... does what it needs too... >I've always wondered about connection pooling (yes, I understand you don't >want to reconnect on every query. I know I don't) Wouldn't it work just as >well using a single connection to the database? Assuming the database >connection is written to handle multiple requests (ie being thread safe). > I suppose I am trying to get out of handling concurrency issues with multiple threads. I went down this road with a pilot OODBMS (psepro not to mention any names) and spent too much time (and code) worrying about concurrency, and not enough time concentrating on buss. logic, and fell behind on my projects. (what I heard from mgmt anyway!) So trying to take advantage of a RDBMS's ability of handling multi-user. We usually have as many as 50-100 threads running all times... >Or is it a matter of security/transactions that says each user has to have >his own connection? > > We are using transactions when they commit to a purchase or subscription. >> My problem is that we use multiple databases per web request. With >> other db's, I can make a connection to a central db, and then select >> .. from .