Hi,
I am trying to insert bulk records into a table, the following is code in my dao. I am using spring and hibernate
for(int i=0;i<allImportClients.size();i++){
ImportClients importClient = (ImportClients)allImportClients.get(i);
getHibernateTemplate().saveOrUpdate(importClient);
if ( i % 10 == 0 ) {
getHibernateTemplate().flush();
getHibernateTemplate().clear();
}
}
and my cfg.xml file has
<property name="hibernate.jdbc.batch_size">10</property>
<property name="hibernate.cache.use_second_level_cache">false</property>
This works fine when i am uploading 1200 records manually.
But when i try with loadrunner by creating 4 vusers who cocurrently insert 1200 records each, then it is throwing exception as
java.lang.outofmemoryerror: java heap space
Please, help me.
Thanks in advance