ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krishnamoorthi, Sruthi (Raytheon)" <Sruthi.Krishnamoor...@USPTO.GOV>
Subject executeBatch () returns 0
Date Thu, 16 Feb 2006 19:23:20 GMT
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;


Mime
View raw message