Commit 0f01b571 authored by jshinde's avatar jshinde

add finally block and close the connection


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@102896 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 851df195
...@@ -2229,6 +2229,34 @@ public class UploadSalesOrderIC extends ValidatorEJB implements UploadSalesOrder ...@@ -2229,6 +2229,34 @@ public class UploadSalesOrderIC extends ValidatorEJB implements UploadSalesOrder
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
//Changed by Jagruti Shinde on 04-08-2016 to add finally block and close the connection [Start]
finally
{
try
{
if(rs != null)
{
rs.close();
rs = null;
}
if (pstmt !=null)
{
pstmt.close();
pstmt = null;
}
if(conn != null)
{
conn.close();
conn = null;
}
}
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
}
//Changed by Jagruti Shinde on 04-08-2016 to add finally block and close the connection [End]
return errCode; return errCode;
} }
...@@ -2876,6 +2904,44 @@ public class UploadSalesOrderIC extends ValidatorEJB implements UploadSalesOrder ...@@ -2876,6 +2904,44 @@ public class UploadSalesOrderIC extends ValidatorEJB implements UploadSalesOrder
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
//Changed by Jagruti Shinde on 04-08-2016 to add finally block and close the connection [Start]
finally
{
try
{
if(rs != null)
{
rs.close();
rs = null;
}
if (pstmt !=null)
{
pstmt.close();
pstmt = null;
}
if(rs1 != null)
{
rs1.close();
rs1 = null;
}
if (pstmt1 !=null)
{
pstmt1.close();
pstmt1 = null;
}
if(conn != null)
{
conn.close();
conn = null;
}
}
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
}
//Changed by Jagruti Shinde on 04-08-2016 to add finally block and close the connection [End]
return schemeCode1; return schemeCode1;
} }
...@@ -4186,6 +4252,44 @@ public class UploadSalesOrderIC extends ValidatorEJB implements UploadSalesOrder ...@@ -4186,6 +4252,44 @@ public class UploadSalesOrderIC extends ValidatorEJB implements UploadSalesOrder
System.out.println("Exception ::" + e.getMessage()); System.out.println("Exception ::" + e.getMessage());
throw new ITMException(e); throw new ITMException(e);
} }
//Changed by Jagruti Shinde on 04-08-2016 to add finally block and close the connection [Start]
finally
{
try
{
if(rs != null)
{
rs.close();
rs = null;
}
if (pstmt !=null)
{
pstmt.close();
pstmt = null;
}
if(rs1 != null)
{
rs1.close();
rs1 = null;
}
if (pstmt1 !=null)
{
pstmt1.close();
pstmt1 = null;
}
if(conn != null)
{
conn.close();
conn = null;
}
}
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
}
//Changed by Jagruti Shinde on 04-08-2016 to add finally block and close the connection [End]
return errCode; return errCode;
} }
......
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