I have some jdbc code in a servlet:

The Isolation Level for my Connection is TRANSACTION_READ_COMMITTED

// set no autocommit
                        try {
                                conn.setAutoCommit (false);
                        } catch (Exception e) {
                                out.println ("setAC no workie");
                        }

// it claims no auto when I run it :)
                        if (conn.getAutoCommit()) {
                                out.println ("crap it's autocommiting");
                        } else {
                                out.println ("it's claiming no auto ");
                        }

// update a row in the table (all rows, but in this case there's only 1
                        PreparedStatement ps = conn.prepareStatement
                         ("update lim set cap = cap + 10 ");

// execute
                        int n = ps.executeUpdate ();

// rollback
                        conn.rollback();

Too bad the "cap" column increments by 10 anyways... did I miss
anything?  Well if it's not orion and I messed up my java code just
let me know.

Much thanks.

Jeff

Reply via email to