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 -> Transactions across database sessions/connections

Transactions across database sessions/connections

From: <coakleyj_at_hotmail.com>
Date: 2000/05/03
Message-ID: <8epv1o$n2l$1@nnrp1.deja.com>#1/1

Hi all.

We are using an application server (EJB server) which is supports EJB1.1 and JTA etc etc. I simply think of this as a modern TP monitor, catering for database connection pooling and transactions for example. We are using an Oracle8i database.

Now, I'm wondering if it's possible to have a single transaction span multiple database sessions. for example (Pseudo code):

begin transaction

grab a connection1 to the database from the pool

insert into table1 (.....) values (......);

Lock table table2;

close the connection [i.e. release the connection back to the pool]

grap another connection from the pool

update .....
insert ....

close the connection [i.e. release the connection back to the pool]

Commit; [end of transaction]

So my question2:

  1. Can transactions span connections? If So, what feature allows this? Is it the XA compliance or something totally different?
  2. Table2 is locked as part of the first connection. We then release the connection - will the record remain locked after the connection is dropped [until the final commit or rollback]?

Thanks for the help

Coakleyj

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed May 03 2000 - 00:00:00 CDT

Original text of this message

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