Hi,
In my experience with oracle, this documentation is misleading at best,
wrong at worst.  Try it yourself.  The difference between read committed
and serializable is not whether you can see the work you are doing within
one transaction, but whether the data you see is consistent during the life
of your transaction.

read committed = you see data committed by other transactions, after they
commit.
serializable = the results are as if the work in committed transactions
were executed serially, one after another ==> one transaction's view of the
data remains constant throughout its life, no matter what other
transactions may be committing.

In both cases you see the changes you make in your transaction.

david jencks



On 2001.06.15 17:53:24 -0400 Gina Hagg wrote:
> and, this is from the same page as before.
> http://technet.oracle.com/doc/server.815/a67781/c23cnsis.htm#2570
> 
> Oracle Isolation Levels 
> 
> Oracle provides three transaction isolation levels: 
> 
> read committed  
> This is the default transaction isolation level. Each
> query executed by a transaction sees only data that
> was committed before the query (not the transaction)
> began. An Oracle query will never read dirty
> (uncommitted) data.    
> Because Oracle does not prevent other transactions
> from modifying the data read by a query, that data may
> be changed by other transactions between two
> executions of the query. Thus, a transaction that
> executes a given query twice may experience both
> nonrepeatable read and phantoms.  
> 
> serializable transactions  
> Serializable transactions see only those changes that
> were committed at the time the transaction began, plus
> those changes made by the transaction itself through
> INSERT, UPDATE, and DELETE statements. Serializable
> transactions do not experience nonrepeatable reads or
> phantoms.
>   
> read-only  
> Read-only transactions see only those changes that
> were committed at the time the transaction began and
> do not allow INSERT, UPDATE, and DELETE statements.
>                          
> --- Jay Walters <[EMAIL PROTECTED]> wrote:
> > Well I am hoping I am just confused and have
> > misunderstood you.
> > 
> > It appeared that you said JDBC connections and
> > Sql*plus ones were different,
> > and that a if I perform an insert inside a
> > transaction using JDBC that
> > within the same transaction I would not be able to
> > read the row inserted.
> > 
> > If in fact you did say that there are two things
> > which are significant.
> > First, the server does not distinguish by client
> > type and both SQL*Plus and
> > JDBC drivers look essentially the same to it.  They
> > both use the same wire
> > protocol to speak with the server.
> > 
> > On the second issue, read committed has to do with
> > other transactions.  Run
> > the embedded JDBC program... you might need to fix
> > up the connection URL.
> > 
> > import java.sql.*;                   // JDBC classes
> > public class Foo {
> >     public static void main( String[] args ) throws
> > SQLException {
> >         // Get connection to the database
> >     DriverManager.registerDriver( new
> > oracle.jdbc.driver.OracleDriver()
> > );
> >         Connection con =
> > DriverManager.getConnection(
> > "jdbc:oracle:thin:@localhost:1521:ORCL", "scott",
> > "tiger" );
> > 
> >         /*  Create the table */
> >     Statement stmt = con.createStatement();
> >       stmt.execute( "CREATE TABLE FOO ( X
> > VARCHAR2(32))" );
> > 
> >       con.setAutoCommit( false );
> >     stmt.executeUpdate( "INSERT INTO FOO VALUES
> > ('Gina')" );
> > 
> >     /* Won't see Gina here! */
> >     ResultSet rs = stmt.executeQuery( "SELECT X FROM
> > FOO" );
> >     System.out.println( "Gina says see nothing" );
> >     while( rs.next() ) {
> >         System.out.println( "Oh oh, Found " +
> > rs.getString( 1 ));
> >     }
> >     rs.close();
> > 
> >     con.rollback();
> > 
> >     /* Won't see Gina here for sure! */
> >     rs = stmt.executeQuery( "SELECT X FROM FOO" );
> >     System.out.println( "Won't find anything here!" );
> >     while( rs.next() ) {
> >         System.out.println( "Found " + rs.getString( 1
> > ));
> >     }
> > 
> >     /* All done, drop the table */
> >       stmt.execute( "DROP TABLE FOO" );
> >     }
> > }      
> > 
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> >
> http://lists.sourceforge.net/lists/listinfo/jboss-development
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Spot the hottest trends in music, movies, and more.
> http://buzz.yahoo.com/
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
> 


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to