Commit 83d70c68 authored by jshaikh's avatar jshaikh

Changed connection from DriverITM to getConnection in fullfinalAct component

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@199398 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 42e76a6d
...@@ -299,9 +299,12 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal, ...@@ -299,9 +299,12 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal,
try try
{ {
ConnDriver connDriver = new ConnDriver(); //----Commented and changed connection buy Jaffar on 09-04-19[Start]
/*ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM"); conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false); conn.setAutoCommit(false);*/
conn = getConnection();
//----Commented and changed connection buy Jaffar on 09-04-19[End]
stmt = conn.createStatement(); stmt = conn.createStatement();
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
...@@ -658,9 +661,12 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal, ...@@ -658,9 +661,12 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal,
log.write("====================================wf_calc_lnint() method called====================="); log.write("====================================wf_calc_lnint() method called=====================");
try try
{ {
ConnDriver connDriver = new ConnDriver(); //----Commented and changed connection buy Jaffar on 09-04-19[Start]
/*ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM"); conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false); conn.setAutoCommit(false);*/
conn = getConnection();
//----Commented and changed connection buy Jaffar on 09-04-19[End]
stmt = conn.createStatement(); stmt = conn.createStatement();
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
...@@ -1030,6 +1036,11 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal, ...@@ -1030,6 +1036,11 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal,
{ {
System.out.println("Closing Connection....."); System.out.println("Closing Connection.....");
log.write("Closing Connection....."); log.write("Closing Connection.....");
if(rs != null)
{
rs.close();
rs = null;
}
if(stmt != null) if(stmt != null)
{ {
stmt.close(); stmt.close();
...@@ -1084,8 +1095,12 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal, ...@@ -1084,8 +1095,12 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal,
try try
{ {
ConnDriver connDriver = new ConnDriver(); //----Commented and changed connection buy Jaffar on 09-04-19[Start]
conn = connDriver.getConnectDB("DriverITM"); /*ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");*/
conn = getConnection();
//----Commented and changed connection buy Jaffar on 09-04-19[End]
//stmt = conn.createStatement(); //stmt = conn.createStatement();
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
...@@ -1338,11 +1353,21 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal, ...@@ -1338,11 +1353,21 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal,
rsMain.close(); rsMain.close();
rsMain = null; rsMain = null;
} }
if(rs != null)
{
rs.close();
rs = null;
}
if(stmt != null) if(stmt != null)
{ {
stmt.close(); stmt.close();
stmt = null; stmt = null;
} }
if(stmt1 != null)
{
stmt1.close();
stmt1 = null;
}
if(conn != null) if(conn != null)
{ {
conn.close(); conn.close();
...@@ -1384,8 +1409,12 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal, ...@@ -1384,8 +1409,12 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal,
try try
{ {
ConnDriver connDriver = new ConnDriver(); //----Commented and changed connection buy Jaffar on 09-04-19[Start]
conn = connDriver.getConnectDB("DriverITM"); /*ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");*/
conn = getConnection();
//----Commented and changed connection buy Jaffar on 09-04-19[End]
stmt = conn.createStatement(); stmt = conn.createStatement();
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
...@@ -1648,6 +1677,11 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal, ...@@ -1648,6 +1677,11 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal,
{ {
System.out.println("Closing Connection....."); System.out.println("Closing Connection.....");
log.write("Closing Connection....."); log.write("Closing Connection.....");
if(rs != null)
{
rs.close();
rs = null;
}
if(stmt != null) if(stmt != null)
{ {
stmt.close(); stmt.close();
...@@ -1706,8 +1740,12 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal, ...@@ -1706,8 +1740,12 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal,
try try
{ {
ConnDriver connDriver = new ConnDriver(); //----Commented and changed connection buy Jaffar on 09-04-19[Start]
conn = connDriver.getConnectDB("DriverITM"); /*ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");*/
conn = getConnection();
//----Commented and changed connection buy Jaffar on 09-04-19[Start]
//stmt = conn.createStatement(); //stmt = conn.createStatement();
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
...@@ -2677,8 +2715,12 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal, ...@@ -2677,8 +2715,12 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal,
try try
{ {
ConnDriver connDriver = new ConnDriver(); //----Commented and changed connection buy Jaffar on 09-04-19[Start]
conn = connDriver.getConnectDB("DriverITM"); /*ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");*/
conn = getConnection();
//----Commented and changed connection buy Jaffar on 09-04-19[End]
stmt = conn.createStatement(); stmt = conn.createStatement();
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
...@@ -3043,6 +3085,11 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal, ...@@ -3043,6 +3085,11 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal,
{ {
System.out.println("Closing Connection....."); System.out.println("Closing Connection.....");
log.write("Closing Connection....."); log.write("Closing Connection.....");
if(rs != null)
{
rs.close();
rs = null;
}
if(stmt != null) if(stmt != null)
{ {
stmt.close(); stmt.close();
...@@ -3389,8 +3436,12 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal, ...@@ -3389,8 +3436,12 @@ public class FullFinalAct extends ActionHandlerEJB implements FullFinalActLocal,
log.write("[FullFinalActEJB] wf_det_insert() : intAmt++++++++++++++++=======>"+intAmt); log.write("[FullFinalActEJB] wf_det_insert() : intAmt++++++++++++++++=======>"+intAmt);
System.out.println("Start Date ------>>"+startDateStr); System.out.println("Start Date ------>>"+startDateStr);
ConnDriver connDriver = new ConnDriver(); //----Commented and changed connection buy Jaffar on 09-04-19[Start]
conn = connDriver.getConnectDB("DriverITM"); /*ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");*/
conn = getConnection();
//----Commented and changed connection buy Jaffar on 09-04-19[End]
stmt = conn.createStatement(); stmt = conn.createStatement();
sqlStr = "SELECT DESCR FROM ACCOUNTS WHERE ACCT_CODE = '"+acctCodeSale+"'"; sqlStr = "SELECT DESCR FROM ACCOUNTS WHERE ACCT_CODE = '"+acctCodeSale+"'";
rs = stmt.executeQuery(sqlStr); rs = stmt.executeQuery(sqlStr);
......
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