Commit 11d94bc4 authored by ssalve's avatar ssalve

Done changes in finally and else block to resolve issues related to close...

Done changes in finally and else block to resolve issues related to close connection/statement on 13NOV2017

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@173471 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b452e9c0
...@@ -1889,6 +1889,21 @@ public class DistCommon ...@@ -1889,6 +1889,21 @@ public class DistCommon
} }
}//if }//if
}// end of loop }// end of loop
//Added by sarita on 13NOV2017
else
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
//rs.close(); //rs.close();
}//try 2 }//try 2
catch(Exception e) catch(Exception e)
...@@ -1897,6 +1912,21 @@ public class DistCommon ...@@ -1897,6 +1912,21 @@ public class DistCommon
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
//Added by sarita on 13-11-2017 [start]
finally
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
//Added by sarita on 13-11-2017 [end]
}//else }//else
//rs.close(); //rs.close();
}//try 1 }//try 1
...@@ -4692,8 +4722,11 @@ public class DistCommon ...@@ -4692,8 +4722,11 @@ public class DistCommon
priceListParent = rs2.getString(1); priceListParent = rs2.getString(1);
//System.out.println("The priceListParent is .... "+priceListParent); //System.out.println("The priceListParent is .... "+priceListParent);
} }
rs.close(); //Commented and Added by sarita on 13NOV2017
rs = null; /*rs.close();
rs = null;*/
rs2.close();
rs2 = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
if((priceListParent == null) || (priceListParent.trim().length() == 0)) if((priceListParent == null) || (priceListParent.trim().length() == 0))
...@@ -8923,13 +8956,41 @@ public class DistCommon ...@@ -8923,13 +8956,41 @@ public class DistCommon
} }
} }
} }
//Added by sarita on 13NOV2017
else
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
} }
catch(Exception e) catch(Exception e)
{ {
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
//Added by sarita on 13NOV2017[start]
finally
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
//Added by sarita on 13NOV2017[end]
} }
} }
...@@ -9755,13 +9816,40 @@ public class DistCommon ...@@ -9755,13 +9816,40 @@ public class DistCommon
} }
} }
} }
//Added by sarita on 13NOV2017
else
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
} }
catch(Exception e) catch(Exception e)
{ {
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
//Added by sarita on 13NOV2017
finally
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
} }
} }
......
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