Commit 32a869c0 authored by prane's avatar prane

to close the cursor and pstmt while retuing string

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@197657 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 67ab787a
......@@ -258,6 +258,8 @@ public class PriceListPos extends ValidatorEJB implements PriceListPosLocal, Pri
}
chkPlrs.close();
chkPlrs = null;
chkPlpstmt.close(); //23feb19[pstmt closed and nulled on 12feb19]
chkPlpstmt = null;
System.out.println("@@@@@@ plCount["+plCount+"]");
if(plCount > 0)
{/*
......@@ -354,6 +356,8 @@ public class PriceListPos extends ValidatorEJB implements PriceListPosLocal, Pri
pricelstGenChrgBill = dtlrs.getDouble("vat_chrg_billing");
pricelstGenMargRet = dtlrs.getDouble("margin_retailer");
}
dtlrs.close();//23feb19[rs closed and nulled on 12feb19]
dtlrs = null;
dtlpstmt.close();
dtlpstmt = null;
......@@ -377,7 +381,8 @@ public class PriceListPos extends ValidatorEJB implements PriceListPosLocal, Pri
}
chkPlrs.close();
chkPlrs = null;
chkPlpstmt.close();//23feb19[rs closed and nulled on 12feb19]
chkPlpstmt = null;
if(plCount > 0)
{
......@@ -444,6 +449,8 @@ public class PriceListPos extends ValidatorEJB implements PriceListPosLocal, Pri
dateOverpstmt.setInt (5, slabNo );
updtCnt = dateOverpstmt.executeUpdate();
dateOverpstmt.close();//23feb19[rs closed and nulled on 12feb19]
dateOverpstmt = null;
}
int slabNoUpdt = 1;
......@@ -1458,6 +1465,9 @@ public class PriceListPos extends ValidatorEJB implements PriceListPosLocal, Pri
currentlotnofr=rs.getString(1);
currentlotnoto=rs.getString(2);
}
rs.close(); rs = null;
pstmtSql.close();
pstmtSql = null;//[pstmt and rs closed and nulled on 23feb19]
recordfound = true;
System.out.println("Recode Found@@@@@@@@@@@@@"+recordfound);
currentlotnofrtemp = currentlotnofr;
......@@ -1857,6 +1867,26 @@ public class PriceListPos extends ValidatorEJB implements PriceListPosLocal, Pri
System.out.println("Exception : "+e);
e.printStackTrace();
throw new ITMException(e);
}finally {
try {
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmtSql != null)
{
pstmtSql.close();
pstmtSql = null;
}
if(pstmtInsert != null)
{
pstmtInsert.close();
pstmtInsert = null;
}
}catch(Excewption e)
{
}
}
return retString;
......
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