Commit a9e77668 authored by dpawar's avatar dpawar

close all resultSet


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96150 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f974559c
...@@ -309,6 +309,14 @@ public String process(Document dom, Document dom2, String windowName, String xtr ...@@ -309,6 +309,14 @@ public String process(Document dom, Document dom2, String windowName, String xtr
{ {
conn.close(); conn.close();
} }
if(rs!=null){
rs.close();
rs=null;
}
if(pstmt !=null){
pstmt.close();
pstmt=null;
}
} }
catch(Exception e) catch(Exception e)
{ {
...@@ -522,10 +530,14 @@ private String generateDebitNote(Connection conn,ArrayList<String> podProcessInv ...@@ -522,10 +530,14 @@ private String generateDebitNote(Connection conn,ArrayList<String> podProcessInv
} //end while invoice trace } //end while invoice trace
rs.close(); if(rs!=null){
rs.close();
rs=null; rs=null;
}
if(pstmt!=null){
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
}
System.out.println("Detail2 xml-------->>[["+detail2xmlString+"]"); System.out.println("Detail2 xml-------->>[["+detail2xmlString+"]");
if(detail3AmtT > 0){ if(detail3AmtT > 0){
invoiceDetailsMap=pod.getDetailsFromInvoice(conn, invoiceId); invoiceDetailsMap=pod.getDetailsFromInvoice(conn, invoiceId);
...@@ -1071,10 +1083,14 @@ private Map<String,Double> schemeApply(Connection conn,String invoiceID,String i ...@@ -1071,10 +1083,14 @@ private Map<String,Double> schemeApply(Connection conn,String invoiceID,String i
schemeQtyMap.put("free_qty", 0.0); schemeQtyMap.put("free_qty", 0.0);
} }
} //end while } //end while
if(rs!=null){
rs.close(); rs.close();
rs=null; rs=null;
}
if(pstmt!=null){
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
}
/*else{ /*else{
System.out.println("----data not found in bomdet---------"); System.out.println("----data not found in bomdet---------");
...@@ -1197,6 +1213,14 @@ private ArrayList<String> getDoneInvoiceIDFromPodTrace(Connection conn) ...@@ -1197,6 +1213,14 @@ private ArrayList<String> getDoneInvoiceIDFromPodTrace(Connection conn)
while(rs.next()){ while(rs.next()){
InvIDList.add(rs.getString(1).trim()); InvIDList.add(rs.getString(1).trim());
} }
if(rs!=null){
rs.close();
rs=null;
}
if(pstmt!=null){
pstmt.close();
pstmt=null;
}
if(InvIDList.size() > 0){ if(InvIDList.size() > 0){
unqInvID.addAll(InvIDList); unqInvID.addAll(InvIDList);
InvIDList.clear(); InvIDList.clear();
...@@ -1402,27 +1426,28 @@ private ArrayList<String> getDoneInvoiceIDFromMiscDrCrRcp(Connection conn,ArrayL ...@@ -1402,27 +1426,28 @@ private ArrayList<String> getDoneInvoiceIDFromMiscDrCrRcp(Connection conn,ArrayL
} //end while misc } //end while misc
if(rs1 != null){ if(rs1 != null){
rs1.close(); rs1.close();
rs1=null; rs1=null;
} }
if(pstmt1 != null){ if(pstmt1 != null){
pstmt1.close(); pstmt1.close();
pstmt1=null; pstmt1=null;
} }
} //end while trace } //end while trace
}//end for loop
if(rs != null){ if(rs != null){
rs.close(); rs.close();
rs=null; rs=null;
} }
if(pstmt != null){ if(pstmt != null){
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
} }
}//end for loop
System.out.println("outside for partialInvoiceMapG-->>["+partialInvoiceMapG+"]"); System.out.println("outside for partialInvoiceMapG-->>["+partialInvoiceMapG+"]");
System.out.println("outside for partialInvID-->>["+partialInvID+"]"); System.out.println("outside for partialInvID-->>["+partialInvID+"]");
if(inv45dayListL.size() > 0){ if(inv45dayListL.size() > 0){
...@@ -1625,15 +1650,15 @@ public String actualQtyPODProcessPartial(Connection conn) //partialInvoiceMap ...@@ -1625,15 +1650,15 @@ public String actualQtyPODProcessPartial(Connection conn) //partialInvoiceMap
rs1=pstmt1.executeQuery(); rs1=pstmt1.executeQuery();
if(rs1.next()){ if(rs1.next()){
sreturnQuantity=rs1.getDouble(2); sreturnQuantity=rs1.getDouble(2);
} }
if(rs1!=null){ if(rs1!=null){
rs1.close(); rs1.close();
rs1=null; rs1=null;
} }
if(pstmt1!=null){ if(pstmt1!=null){
pstmt1.close(); pstmt1.close();
pstmt1=null; pstmt1=null;
} }
} }
itemActive=pod.getColumnDescr(conn,"active","item","item_code",itemCode); itemActive=pod.getColumnDescr(conn,"active","item","item_code",itemCode);
...@@ -1853,13 +1878,13 @@ public void partialInvDebitNote(Connection conn,ArrayList<String> invIdPartial) ...@@ -1853,13 +1878,13 @@ public void partialInvDebitNote(Connection conn,ArrayList<String> invIdPartial)
pstmt1.setString(2, itemCode); pstmt1.setString(2, itemCode);
rs1=pstmt1.executeQuery(); rs1=pstmt1.executeQuery();
if(rs1.next()){ if(rs1.next()){
sreturnQuantity=rs.getDouble(2); sreturnQuantity=rs1.getDouble(2);
} }
if(rs1!=null){ if(rs1!=null){
rs1.close(); rs1.close();
rs1=null; rs1=null;
} }
if(pstmt!=null){ if(pstmt1!=null){
pstmt1.close(); pstmt1.close();
pstmt1=null; pstmt1=null;
} }
...@@ -1871,6 +1896,14 @@ public void partialInvDebitNote(Connection conn,ArrayList<String> invIdPartial) ...@@ -1871,6 +1896,14 @@ public void partialInvDebitNote(Connection conn,ArrayList<String> invIdPartial)
} //end while } //end while
if(rs!=null){
rs.close();
rs=null;
}
if(pstmt!=null){
pstmt.close();
pstmt=null;
}
} }
} }
catch(Exception e) catch(Exception e)
...@@ -2020,6 +2053,7 @@ public double getPriceListRate(String priceList, java.util.Date tranDate, String ...@@ -2020,6 +2053,7 @@ public double getPriceListRate(String priceList, java.util.Date tranDate, String
{ {
rs.close(); rs.close();
} }
} }
catch(Exception e) catch(Exception e)
{ {
......
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