if you want each insert to work indepedently yet stay with the transaction model, then each insert should be its own transaction...
conn.setAutoCommit(false); executeUpdate("insert into employee(id,name) values(1, 'K1')"); conn.commit(); executeUpdate("insert into employee(id,name) values(1, 'K1')"); conn.commit(); executeUpdate("insert into employee(id,name) values(1, 'K2')"); conn.commit();
otherwise the way you wrote it, its a single transaction. all three inserts have to succeed, otherwise, all three are rolledback. why is that so hard to understand?