Commit 90c7bc00 authored by jshaikh's avatar jshaikh

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@195199 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 8525529c
...@@ -436,6 +436,19 @@ public class PorcpAct extends ActionHandlerEJB implements PorcpActLocal, PorcpAc ...@@ -436,6 +436,19 @@ public class PorcpAct extends ActionHandlerEJB implements PorcpActLocal, PorcpAc
valueXmlString.append("</Detail>\r\n"); valueXmlString.append("</Detail>\r\n");
reqDateStr = ""; reqDateStr = "";
}//while end }//while end
if(rs != null)
{
rs.close();
rs = null;
}
if(stmt != null)
{
stmt.close();
stmt = null;
}
valueXmlString.append("</Root>\r\n"); valueXmlString.append("</Root>\r\n");
}//try end }//try end
catch(Exception e) catch(Exception e)
...@@ -495,6 +508,21 @@ public class PorcpAct extends ActionHandlerEJB implements PorcpActLocal, PorcpAc ...@@ -495,6 +508,21 @@ public class PorcpAct extends ActionHandlerEJB implements PorcpActLocal, PorcpAc
count = rset.getInt(1); count = rset.getInt(1);
System.out.println("count :"+count); System.out.println("count :"+count);
} }
//Added by Jaffar S. on 03-01-19 for closing connection & statement --[Start]
if(rset != null)
{
rset.close();
rset = null;
}
if(stmt != null)
{
stmt.close();
stmt = null;
}
//Added by Jaffar S. on 03-01-19 for closing connection & statement --[End]
if (count == 0 || detCnt.equals("0")) if (count == 0 || detCnt.equals("0"))
{ {
valueXmlString.append("<Detail>"); valueXmlString.append("<Detail>");
...@@ -538,6 +566,38 @@ public class PorcpAct extends ActionHandlerEJB implements PorcpActLocal, PorcpAc ...@@ -538,6 +566,38 @@ public class PorcpAct extends ActionHandlerEJB implements PorcpActLocal, PorcpAc
{ {
throw new ITMException(e); throw new ITMException(e);
} }
//Added by Jaffar S. on 03-01-19 for closing connection & statement --[Start]
finally
{
try
{
if (rset != null)
{
rset.close();
rset = null;
}
if (stmt != null )
{
stmt.close();
stmt = null;
}
if (conn != null )
{
conn.close();
conn = null;
}
}
catch(Exception e)
{
System.out.println("Exception :: "+e);
e.printStackTrace();
}
}
//Added by Jaffar S. on 03-01-19 for closing connection & statement --[End]
System.out.println("valueXmlString from :"+valueXmlString.toString()); System.out.println("valueXmlString from :"+valueXmlString.toString());
return valueXmlString.toString(); return valueXmlString.toString();
} }
......
...@@ -1622,10 +1622,16 @@ public class SorderCancel extends ActionHandlerEJB implements SorderCancelLocal, ...@@ -1622,10 +1622,16 @@ public class SorderCancel extends ActionHandlerEJB implements SorderCancelLocal,
if(errString != null && errString.trim().length() > 0) if(errString != null && errString.trim().length() > 0)
{ {
conn.rollback(); conn.rollback();
//Added by Jaffar S. on 03-01-19 for closing connection
conn.close();
conn = null;
} }
else else
{ {
conn.commit(); conn.commit();
//Added by Jaffar S. on 03-01-19 for closing connection
conn.close();
conn = null;
} }
} }
catch (Exception e1) catch (Exception e1)
......
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