setTransactionIsolation(int level)

Syntax:

void setTransactionIsolation(int level)
                             throws SQLException

Description:

Attempts to change the transaction isolation level for this Connection object to the one given. The constants defined in the interface Connection are the possible transaction isolation levels.

Parameters:

level

one of the following Connection constants: Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, or Connection.TRANSACTION_SERIALIZABLE.

(Note that Connection.TRANSACTION_NONE cannot be used because it specifies that transactions are not supported.)

Throws:

SQLException - if a database access error occurs or a transaction is currently active

Reference:

For more information, reference JDBC documentation for: Connection.setTransactionIsolation(int)