Commit 66b919fc authored by ssalve's avatar ssalve

Sarita : Done changes to 1. remove Lookup for ITMDBAccessEJB and created...

Sarita : Done changes to 1. remove Lookup for ITMDBAccessEJB and created object and  2. use connection method of ITMDBAccessEJB for calling getErrorString 

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@187973 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 868c58d0
...@@ -5,7 +5,7 @@ import java.rmi.RemoteException; ...@@ -5,7 +5,7 @@ import java.rmi.RemoteException;
import ibase.system.config.ConnDriver; import ibase.system.config.ConnDriver;
import ibase.utility.EMail; import ibase.utility.EMail;
import ibase.webitm.ejb.ITMDBAccessEJB; import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ITMDBAccessLocal; //import ibase.webitm.ejb.ITMDBAccessLocal;//Commented by sarita on 20 JULY 18
import ibase.webitm.ejb.ValidatorEJB; import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.GenericUtility; import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
...@@ -48,7 +48,10 @@ public class HolChangeConf extends ActionHandlerEJB implements HolChangeConfLoca ...@@ -48,7 +48,10 @@ public class HolChangeConf extends ActionHandlerEJB implements HolChangeConfLoca
int updStatus = 0; int updStatus = 0;
ITMDBAccessLocal itmDBAccess = null; //Added & Commented by sarita to use object of ITMDBAccessEJB instead ITMDBAccessLocal on 20 JULY 18.[START]
//ITMDBAccessLocal itmDBAccess = null;
ITMDBAccessEJB itmDBAccess = null;
//Added & Commented by sarita to use object of ITMDBAccessEJB instead ITMDBAccessLocal on 20 JULY 18.[END]
String sql = ""; String sql = "";
String empCode = ""; String empCode = "";
...@@ -74,9 +77,12 @@ public class HolChangeConf extends ActionHandlerEJB implements HolChangeConfLoca ...@@ -74,9 +77,12 @@ public class HolChangeConf extends ActionHandlerEJB implements HolChangeConfLoca
System.out.println(" xtraParams [" + xtraParams + "] "); System.out.println(" xtraParams [" + xtraParams + "] ");
System.out.println(" forcedFlag [" + forcedFlag + "] "); System.out.println(" forcedFlag [" + forcedFlag + "] ");
AppConnectParm appConnect = new AppConnectParm(); //Added & Commented by sarita to create object instead creating lookup for ITMDBAccessEJB on 20 JULY 18 [START]
/*AppConnectParm appConnect = new AppConnectParm();
InitialContext ctx = new InitialContext(appConnect.getProperty()); InitialContext ctx = new InitialContext(appConnect.getProperty());
itmDBAccess = (ITMDBAccessLocal)ctx.lookup("ibase/ITMDBAccessEJB/local"); itmDBAccess = (ITMDBAccessLocal)ctx.lookup("ibase/ITMDBAccessEJB/local"); */
itmDBAccess = new ITMDBAccessEJB();
//Added & Commented by sarita to create object instead creating lookup for ITMDBAccessEJB on 20 JULY 18 [END]
System.out.println(" I N S I D E C A S E "); System.out.println(" I N S I D E C A S E ");
System.out.println("tranId [" + tranId + "]"); System.out.println("tranId [" + tranId + "]");
...@@ -106,6 +112,7 @@ public class HolChangeConf extends ActionHandlerEJB implements HolChangeConfLoca ...@@ -106,6 +112,7 @@ public class HolChangeConf extends ActionHandlerEJB implements HolChangeConfLoca
conn = connDriver.getConnectDB("DriverITM"); conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false); conn.setAutoCommit(false);
System.out.println("emp Code [" + empCode + "] hol date for [" + holDateForSql + "] hol date to [" + holDateToSql + "] hol type" +holType ); System.out.println("emp Code [" + empCode + "] hol date for [" + holDateForSql + "] hol date to [" + holDateToSql + "] hol type" +holType );
...@@ -128,7 +135,10 @@ public class HolChangeConf extends ActionHandlerEJB implements HolChangeConfLoca ...@@ -128,7 +135,10 @@ public class HolChangeConf extends ActionHandlerEJB implements HolChangeConfLoca
} }
else else
{ {
retString = itmDBAccess.getErrorString("emp_code", "VTHOLCHG03", userID); //Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString("emp_code", "VTHOLCHG03", userID);
retString = itmDBAccess.getErrorString("emp_code","VTHOLCHG03",userID,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
} }
System.out.println(" confirm [" + confirm + "] "); System.out.println(" confirm [" + confirm + "] ");
...@@ -155,23 +165,35 @@ public class HolChangeConf extends ActionHandlerEJB implements HolChangeConfLoca ...@@ -155,23 +165,35 @@ public class HolChangeConf extends ActionHandlerEJB implements HolChangeConfLoca
if(updStatus > 0) if(updStatus > 0)
{ {
//retString = itmDBAccess.getErrorString("emp_code", "VTSUCC", userID); //retString = itmDBAccess.getErrorString("emp_code", "VTSUCC", userID);
retString = itmDBAccess.getErrorString("emp_code", "VTHOLCHG04", userID); //Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString("emp_code", "VTHOLCHG04", userID);
retString = itmDBAccess.getErrorString("emp_code","VTHOLCHG04",userID,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
conn.commit(); conn.commit();
} }
else else
{ {
retString = itmDBAccess.getErrorString("emp_code", "VTHOLCHG03", userID); //Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString("emp_code", "VTHOLCHG03", userID);
retString = itmDBAccess.getErrorString("emp_code","VTHOLCHG03",userID,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
conn.rollback(); conn.rollback();
} }
} }
else if(confirm.equalsIgnoreCase("C")) else if(confirm.equalsIgnoreCase("C"))
{ {
retString = itmDBAccess.getErrorString("emp_code", "VTHOLCHG05", userID); //Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString("emp_code", "VTHOLCHG05", userID);
retString = itmDBAccess.getErrorString("emp_code","VTHOLCHG05",userID,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
} }
else if(confirm.equalsIgnoreCase("Y")) else if(confirm.equalsIgnoreCase("Y"))
{ {
retString = itmDBAccess.getErrorString("emp_code", "VTCONF1", userID); //Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString("emp_code", "VTCONF1", userID);
retString = itmDBAccess.getErrorString("emp_code","VTCONF1",userID,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
} }
} }
} }
......
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