gleimar 2017-06-01 23:01:41 +00:00
parent c0be8a0731
commit fcf81e1c0c
1 changed files with 4 additions and 0 deletions

View File

@ -234,6 +234,8 @@ public class CalcularPeajeHibernateDAO extends GenericHibernateDAO<String, Strin
int i=0; int i=0;
for(PeajeVO peajeVO : peajes){ for(PeajeVO peajeVO : peajes){
i++;
stmt.addBatch(peajeVO.toInsertQuery()); stmt.addBatch(peajeVO.toInsertQuery());
stmt.addBatch(peajeVO.toUpdateExcepcionPeajeQuery()); stmt.addBatch(peajeVO.toUpdateExcepcionPeajeQuery());
stmt.addBatch(peajeVO.toUpdateExcepcionPeajeVigenciaQuery()); stmt.addBatch(peajeVO.toUpdateExcepcionPeajeVigenciaQuery());
@ -244,6 +246,7 @@ public class CalcularPeajeHibernateDAO extends GenericHibernateDAO<String, Strin
if(i%100 == 0){ if(i%100 == 0){
result = stmt.executeBatch(); result = stmt.executeBatch();
con.commit(); con.commit();
stmt.close();
stmt = con.createStatement(); stmt = con.createStatement();
} }
@ -251,6 +254,7 @@ public class CalcularPeajeHibernateDAO extends GenericHibernateDAO<String, Strin
result = stmt.executeBatch(); result = stmt.executeBatch();
con.commit(); con.commit();
stmt.close();
recalcularExcecoesPedagio(peajes); recalcularExcecoesPedagio(peajes);
} }
catch (SQLException e) { catch (SQLException e) {