executeBatch () returns 0 : Solution please
code:

try

{

sqlMap.startTransaction();

sqlMap.startBatch();

for (int i=0;i<docCnts.size();i++)

{

System.out.println("updtFlCntList"+((Document)docCnts.get(i)).toString());

sqlMap.update("updtFlCntsList",(Document)docCnts.get(i));

}

updCount =sqlMap.executeBatch();

System.out.println("updCount:-"+updCount);

sqlMap.commitTransaction();

}

catch (SQLException e)

{

try

{

sqlMap.endTransaction();

}

catch(SQLException se)

{

throw new RuntimeException("SQLException:"+se);

}

logger.debug(e.getMessage());

throw new FileContentException(e.getMessage());

}

finally

{

try

{

sqlMap.endTransaction();

}

catch(SQLException se)

{

throw new RuntimeException("SQLException:"+se);

}

}

return updCount;

Reply via email to