Commit 64dd5402 authored by ajadhav's avatar ajadhav

unclosed connection, statment and resultset to be closed

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@184494 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7b1bf096
...@@ -2325,6 +2325,27 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M ...@@ -2325,6 +2325,27 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M
d.printStackTrace(); d.printStackTrace();
throw new ITMException(d); throw new ITMException(d);
} }
//Add by Ajay Jadhav on 27/04/18:START
finally {
try {
if (conn != null) {
if (rs != null) {
rs.close();
rs = null;
}
if (pstmt != null) {
pstmt.close();
pstmt = null;
}
conn.close();
}
conn = null;
} catch (Exception d) {
d.printStackTrace();
throw new ITMException(d);
}
}
//Add by Ajay Jadhav on 27/04/18:END
} }
errString = errStringXml.toString(); errString = errStringXml.toString();
return errString; return errString;
......
...@@ -748,6 +748,27 @@ public class RetainerContractIC extends ValidatorEJB implements RetainerContract ...@@ -748,6 +748,27 @@ public class RetainerContractIC extends ValidatorEJB implements RetainerContract
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
//Add by Ajay on 02/05/18:START
finally {
try {
if (conn != null) {
if (rs != null) {
rs.close();
rs = null;
}
if (pstmt != null) {
pstmt.close();
pstmt = null;
}
conn.close();
}
conn = null;
} catch (Exception d) {
d.printStackTrace();
throw new ITMException(d);
}
}
//Add by Ajay on 02/05/18:END
return errStringXml.toString(); return errStringXml.toString();
} }
...@@ -1523,6 +1544,27 @@ public class RetainerContractIC extends ValidatorEJB implements RetainerContract ...@@ -1523,6 +1544,27 @@ public class RetainerContractIC extends ValidatorEJB implements RetainerContract
}catch(Exception e) }catch(Exception e)
{ {
} }
//Add by Ajay on 02/05/18:START
finally {
try {
if (conn != null) {
if (rs != null) {
rs.close();
rs = null;
}
if (pstmt != null) {
pstmt.close();
pstmt = null;
}
conn.close();
}
conn = null;
} catch (Exception d) {
d.printStackTrace();
throw new ITMException(d);
}
}
//Add by Ajay on 02/05/18:END
return valueXmlString.toString(); return valueXmlString.toString();
} }
......
...@@ -1141,12 +1141,13 @@ public class RetainerContractReleasePrc extends ProcessEJB implements RetainerCo ...@@ -1141,12 +1141,13 @@ public class RetainerContractReleasePrc extends ProcessEJB implements RetainerCo
throw new ITMException(d); throw new ITMException(d);
} }
} }
/*finally //Changes by Ajay on 02/05/18:START
finally
{ {
System.out.println("Closing Connection...."); System.out.println("Closing Connection....");
try { try {
if (conn != null && !conn.isClosed()) { if (conn != null && !conn.isClosed()) {
conn.commit();
conn.close(); conn.close();
conn = null; conn = null;
} }
...@@ -1155,7 +1156,8 @@ public class RetainerContractReleasePrc extends ProcessEJB implements RetainerCo ...@@ -1155,7 +1156,8 @@ public class RetainerContractReleasePrc extends ProcessEJB implements RetainerCo
e.printStackTrace(); e.printStackTrace();
return errString; return errString;
} }
}*/ }
////Changes by Ajay on 02/05/18:END
return errString; return errString;
} }
......
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