Commit 25157dfa authored by arawankar's avatar arawankar

-Connection closing related changes made in below components

MiscVoucherAct.java
VouchPayAct.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@189965 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9e1a6b2e
...@@ -38,7 +38,7 @@ public class MiscVoucherAct extends ActionHandlerEJB implements MiscVoucherActLo ...@@ -38,7 +38,7 @@ public class MiscVoucherAct extends ActionHandlerEJB implements MiscVoucherActLo
{ {
return ""; return "";
} }
public String actionHandler(String actionType, String xmlString, String objContext, String xtraParams) throws RemoteException,ITMException public String actionHandler(String actionType, String xmlString, String objContext, String xtraParams) throws RemoteException,ITMException
{ {
Document dom = null; Document dom = null;
...@@ -56,14 +56,14 @@ public class MiscVoucherAct extends ActionHandlerEJB implements MiscVoucherActLo ...@@ -56,14 +56,14 @@ public class MiscVoucherAct extends ActionHandlerEJB implements MiscVoucherActLo
resString = actionDefault(dom,objContext,xtraParams); resString = actionDefault(dom,objContext,xtraParams);
} }
} }
catch(Exception e) catch(Exception e)
{ {
System.out.println("Exception :MiscVoucher :actionHandler(String xmlString):" + e.getMessage() + ":"); System.out.println("Exception :MiscVoucher :actionHandler(String xmlString):" + e.getMessage() + ":");
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
System.out.println("returning from actionVoucher actionHandler"+resString); System.out.println("returning from actionVoucher actionHandler"+resString);
return resString; return resString;
} }
public String actionHandler(String tranId, String xtraParams, String forcedFlag) throws RemoteException, ITMException public String actionHandler(String tranId, String xtraParams, String forcedFlag) throws RemoteException, ITMException
{ {
...@@ -74,19 +74,38 @@ public class MiscVoucherAct extends ActionHandlerEJB implements MiscVoucherActLo ...@@ -74,19 +74,38 @@ public class MiscVoucherAct extends ActionHandlerEJB implements MiscVoucherActLo
conn=getConnection(); conn=getConnection();
VouchPayAct vouchpay=new VouchPayAct(); VouchPayAct vouchpay=new VouchPayAct();
resString=vouchpay.actionPay(tranId, xtraParams, "M-VOUC",false,conn); resString=vouchpay.actionPay(tranId, xtraParams, "M-VOUC",false,conn);
} }
catch(Exception e) catch(Exception e)
{ {
System.out.println("Exception :MiscVoucher :actionHandler(String xmlString):" + e.getMessage() + ":"); System.out.println("Exception :MiscVoucher :actionHandler(String xmlString):" + e.getMessage() + ":");
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
//Modified by Anjali R. on [28/08/2018][connection was not close][start]
finally
{
try
{
if(conn != null)
{
conn.close();
conn = null;
}
}
catch(Exception ex)
{
System.out.println("Exception in actionHandler--["+ ex.getMessage() +"]");
ex.printStackTrace();
}
}
//Modified by Anjali R. on [28/08/2018][connection was not close][End]
System.out.println("returning from actionVoucher actionHandler"+resString); System.out.println("returning from actionVoucher actionHandler"+resString);
return resString; return resString;
} }
private String actionDefault(Document dom, String objContext, String xtraParams) throws RemoteException , ITMException private String actionDefault(Document dom, String objContext, String xtraParams) throws RemoteException , ITMException
{ {
String sundryType = "", sql = "", detCnt = "0", empCode = "", sundryCode = "", cctrCode = "", acctCode ="", grade = "", billNo = "", billDate = ""; String sundryType = "", sql = "", detCnt = "0", empCode = "", sundryCode = "", cctrCode = "", acctCode ="", grade = "", billNo = "", billDate = "";
...@@ -105,9 +124,9 @@ public class MiscVoucherAct extends ActionHandlerEJB implements MiscVoucherActLo ...@@ -105,9 +124,9 @@ public class MiscVoucherAct extends ActionHandlerEJB implements MiscVoucherActLo
if (detCnt.equals("0")) if (detCnt.equals("0"))
{ {
//Changes and Commented By Bhushan on 06-06-2016 :START //Changes and Commented By Bhushan on 06-06-2016 :START
//conn = connDriver.getConnectDB("DriverITM"); //conn = connDriver.getConnectDB("DriverITM");
conn = getConnection(); conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END //Changes and Commented By Bhushan on 06-06-2016 :END
stmt = conn.createStatement(); stmt = conn.createStatement();
sundryType = genericUtility.getColumnValue("sundry_type",dom); sundryType = genericUtility.getColumnValue("sundry_type",dom);
...@@ -228,7 +247,7 @@ conn = getConnection(); ...@@ -228,7 +247,7 @@ conn = getConnection();
int metaDataNodeListLen = metaDataList.getLength(); int metaDataNodeListLen = metaDataList.getLength();
int importedListLen = importedList.getLength(); int importedListLen = importedList.getLength();
System.out.println("\n metaDataNodeListLen :"+metaDataNodeListLen+"\n importedListLen :"+importedListLen); System.out.println("\n metaDataNodeListLen :"+metaDataNodeListLen+"\n importedListLen :"+importedListLen);
//Added by jiten //Added by jiten
boolean flag = false; boolean flag = false;
NodeList childNodeList = null; NodeList childNodeList = 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