Connection.setTransactionIsolation(int) warns:
Note: If this method is called during a transaction, the result is implementation-defined.
You can use these methods for transaction:
con
con.setAutoCommit(false);
con.commit();
con.rollback();