Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Multiple db connections

Re: Multiple db connections

From: Graham Thornton <graham.thornton_at_ln.ssw.abbott.com>
Date: Thu, 28 Sep 2000 09:51:29 -0500
Message-ID: <39D35AF1.A2569FC@ln.ssw.abbott.com>

Yong Huang wrote:

> Can you explain more about "all other users are going to see the changes
> even before the commit happens"? How can that happen? What should I do to
> make this happen? Thank you.
>
>

If you use one master connection to the database, and then execute invidual transactions using the parse/execute/fetch mechanism, Oracle is going to treat all of your transactions as a single logical transaction.

Even though the Webserver sees users A and B, the database will see them both as the same user, and any changes made by one will be immediately visible to all.

Locking won't work, since a lock taken out by one will be owned by everyone, and if anybody executes a rollback then everybody's work will get rolled back.

The connection pool differs from this approach by providing each concurrent transaction with an independent connection through the pool. Whilst a user is making an update they have exclusive use of the connect, and any locks, updates or rollbacks they perform will be isolated just to them until they release the connection.

Hans Bergsten wrote a pretty good piece on connection pools for Java programmer at: http://www.webdevelopersjournal.com/columns/connection_pool.html

Hope that helps

Graham Received on Thu Sep 28 2000 - 09:51:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US