Hi,
I am trying to use hibernate batch processing. In order to do so, I updated my ejb persistence.xml with the property,
<property name="hibernate.jdbc.batch_size" value="50"/>
and updated my code accordingly,
Code:
int count = 0
for (; count < listCarTO.size(); ++count) {
entity = (Car) Builder.buildEntity(new Car(), listCarTO.get(insertsCount));
getEntityManager().persist(entity);
if ( count % 50 == 0) {
getEntityManager().flush();
getEntityManager().clear();
}
}
return count;
How can I be certain that batching is being used ?