Hello guy I create a Batch with a PreparedStatement in java like this
for(Item item: list){
ps.setString(1, item.getSome());
ps.setString(2
I think it can be summed up in one word IGNORE
When you run the batch with this
sb.append("INSERT IGNORE INTO `FRT_DB`.`ITEM` ");
This NOT throw a Exception realted with constrains, this pass over, and still old data in your rows
If you need save the 'new data' you change for INSERT ... ON DUPLICATE KEY Statement, but , right now think dont need it.
Commit or rollback is not necesary in your code @Transactional work for you.
Your big try { only crash in SqlException not in BatchUpdateException
You only need add allowMultiQueries beacuse other and default true
http://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html