Below is the code executing insert query in iterations :
session = sessionFactory.getCurrentSession();
for (SampleBO items : listCTN) {
try {
query = session
.createSQLQuery("insert into xyx values(.......) where items="+items.getItem());
OBJLOG.info("query executed is" + query);
query.executeUpdate();
result = "success";
}
Here queries are executing one after the other. How can I execute queries in batches?