Commit aa6aed87 authored by wansari's avatar wansari

W15ISUN009 Changed by wasim to close connection in finally block


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@102777 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 31f9fda7
...@@ -76,16 +76,18 @@ public class PhysicalCountSchedule implements Schedule ...@@ -76,16 +76,18 @@ public class PhysicalCountSchedule implements Schedule
ibase.utility.UserInfoBean userInfo = null; ibase.utility.UserInfoBean userInfo = null;
//Change by chandrashekar on 13/02/14 //Change by chandrashekar on 13/02/14
String disparmLoginSiteCode="",actualLoginSiteCode=""; String disparmLoginSiteCode="",actualLoginSiteCode="";
ConnDriver connDriver = new ConnDriver();
Connection conn = null; Connection conn = null;
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
String queryString=""; String queryString="";
String sql=""; String sql="";
try try
{ {
//Changed by wasim on 02-08-2016 to get connection in try block [START]
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed by wasim on 02-08-2016 to get connection in try block [END]
//Chnaged by Rohan on 7/2/12.start //Chnaged by Rohan on 7/2/12.start
//insertSchedule(); //insertSchedule();
...@@ -200,6 +202,18 @@ public class PhysicalCountSchedule implements Schedule ...@@ -200,6 +202,18 @@ public class PhysicalCountSchedule implements Schedule
{ {
throw new Exception(e); throw new Exception(e);
} }
//Changed by wasim on 02-08-2016 to add finally block and close the connection [Start]
finally
{
if(conn !=null)
{
conn.close();
conn = null;
}
}
//Changed by wasim on 02-08-2016 to add finally block and close the connection [End]
return ""; return "";
} }
public String insertSchedule(String loginSiteCode,String empCode,UserInfoBean userInfo,String windowName,String xtraParams) public String insertSchedule(String loginSiteCode,String empCode,UserInfoBean userInfo,String windowName,String xtraParams)
......
...@@ -87,6 +87,13 @@ public class WaveGenSchedule implements Schedule ...@@ -87,6 +87,13 @@ public class WaveGenSchedule implements Schedule
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
//Changed by wasim on 02-08-2016 to close the connection [Start]
if(conn !=null)
{
conn.close();
conn = null;
}
//Changed by wasim on 02-08-2016 to close the connection [End]
} }
return errorString; return errorString;
} }
......
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