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: JDBC connection transactions

Re: JDBC connection transactions

From: Alex Filonov <afilonov_at_pro-ns.net>
Date: Fri, 08 Dec 2000 22:39:26 GMT
Message-ID: <90rnut$a64$1@nnrp1.deja.com>

  1. I'd recommend you to read Oracle Concepts manual before implementing any of such things.
  2. Transaction starts when you run any SQL statement which changes any of tables. It ends either with commit command or with rollback command. So, if you have autocommit off, everything between first insert/update/delete statement and commit/rollback is one transaction. You can successfully roll back all statements in this transaction with rollback statement.
  3. Queries do not create transaction!

In article <90r2vn$nor$1_at_nnrp1.deja.com>,   seanldus_at_my-deja.com wrote:
> I need to accomplish a number of related select/insert
 statements(about
> 10 or 12 distinct queries most on seperate tables) these are all
> related and if one fails I need to roll all the others back.
>
> This is a servlet environment written in java. It seems to me that I
> could implament one of a number of standards. I could get a non-
> autocommitting connection and pass it from transaction to transaction,
> rolling back or commiting as needed. I could also create the entire
> set of queries as one stored procedure. or I could do a combination
 of
> the two(this is what I am doing now but it seems problematic because
> the stored procedures that do part of the work will commit on
> finishing, thus making any rollback back in the java layer useless)
>
> the problem with going to the database 10 or 12 times per each one of
> these transactions is just that going to the database 10 or 12 times
> per each one of these transactions.
>
> I wondered if there is a standard way that people handle this. Or if
> anyone has any tricks/places to look for reading, etc.
>
> Thanks in advance
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Dec 08 2000 - 16:39:26 CST

Original text of this message

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