Commit 928aa149 authored by skhan's avatar skhan

change for try catch in while loop as told by s manoharan


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91091 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a3e2ae03
...@@ -176,6 +176,9 @@ public class DownloadCSVBatchBean implements Schedule ...@@ -176,6 +176,9 @@ public class DownloadCSVBatchBean implements Schedule
while( tranItr.hasNext() ) while( tranItr.hasNext() )
{ {
try
{
tranId = ( String ) tranItr.next(); tranId = ( String ) tranItr.next();
dnldFileName = ( String )tranFileMip.get( tranId ); dnldFileName = ( String )tranFileMip.get( tranId );
...@@ -196,18 +199,33 @@ public class DownloadCSVBatchBean implements Schedule ...@@ -196,18 +199,33 @@ public class DownloadCSVBatchBean implements Schedule
fw.close(); fw.close();
fw = null; fw = null;
//Changed by Rupali [update the Download_flag after each invoice files downloading].Start
//pstmt.addBatch();
pstmt.setString( 1, tranId ); pstmt.setString( 1, tranId );
pstmt.addBatch(); int rowCnt = pstmt.executeUpdate();
if(rowCnt >= 1){
conn.commit();
} }
else{
conn.rollback();
}
}catch( Exception ex )
{
//ignore this exception as if one file throws exception next file should download.
}
//Changed by Rupali [update the Download_flag after each invoice files downloading].End
pstmt.executeBatch(); }
//Changed by Rupali [update the Download_flag after each invoice files downloading].Start
//pstmt.executeBatch();
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
/*
try{ try{
conn.commit(); conn.commit();
}catch( Exception ex ){} }catch( Exception ex ){}
*/
//Changed by Rupali [update the Download_flag after each invoice files downloading].End
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment