Commit e017a85b authored by cpatil's avatar cpatil

add conn close


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93935 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c36ba36c
...@@ -98,9 +98,9 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt ...@@ -98,9 +98,9 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt
detailDom = genericUtility.parseString(xmlString2); detailDom = genericUtility.parseString(xmlString2);
} }
retStr = process(headerDom, detailDom, windowName, xtraParams,conn); retStr = process(headerDom, detailDom, windowName, xtraParams,conn);
System.out.println("@@@@@ final return string["+retStr+"]"); System.out.println("@@@@@ final return string["+retStr+"]");
if( retStr != null && retStr.trim().length() > 0 ) if( retStr != null && retStr.trim().length() > 0 )
{ {
System.out.println("transaction update failed........"); System.out.println("transaction update failed........");
...@@ -120,6 +120,22 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt ...@@ -120,6 +120,22 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
finally
{
try
{
if (conn != null)
{
conn.close();
conn = null;
}
} catch (Exception e)
{
System.out.println("Exception :GenerateReceiptPrcEJB :process(String xmlString, String xmlString2, String windowName, String xtraParams):" + e.getMessage() + ":");
e.printStackTrace();
throw new ITMException(e);
}
}
return retStr; return retStr;
} }
public String process(Document headerDom, Document detailDom, String windowName, String xtraParams,Connection conn) throws RemoteException,ITMException public String process(Document headerDom, Document detailDom, String windowName, String xtraParams,Connection conn) throws RemoteException,ITMException
...@@ -1123,11 +1139,9 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt ...@@ -1123,11 +1139,9 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt
conn.commit(); //commit to transaction conn.commit(); //commit to transaction
//retStr = itmDBAccessLocal.getErrorString("","VPSUCC1",""); //retStr = itmDBAccessLocal.getErrorString("","VPSUCC1","");
} }
System.out.println("Closing Connection2...."); //System.out.println("Closing Connection2....");
//fw.flush(); //conn.close();
//fw.close(); //conn = null;
conn.close();
conn = null;
} }
catch(Exception se) catch(Exception se)
{ {
......
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