Commit f3b16192 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@187969 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f7434a62
......@@ -10,7 +10,10 @@ import ibase.system.config.ConnDriver;
import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ActionHandlerEJB;
import ibase.webitm.ejb.ITMDBAccessLocal;
//Added and Commented by sarita on 20 JULY 18 [START]
import ibase.webitm.ejb.ITMDBAccessEJB;
//import ibase.webitm.ejb.ITMDBAccessLocal;
//Added and Commented by sarita on 20 JULY 18 [END]
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.adm.AdmCommon;
import ibase.webitm.utility.ITMException;
......@@ -112,7 +115,10 @@ public class EmpMaritalStatusConf extends ActionHandlerEJB implements EmpMarital
ResultSet rs = null;
AppConnectParm appConnect = null;
InitialContext initialCtx = null;
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]
ValidatorEJB validator = null;
String empCode = "", tranDate = "", statusDate = "", oldStatus = "", newStatus = "", amount = "", generateVouch = "";
E12GenericUtility genericUtility = null;
......@@ -128,14 +134,20 @@ public class EmpMaritalStatusConf extends ActionHandlerEJB implements EmpMarital
double totalAmount = 0.0d, exchangeRate = 0.0d, totalAmountBC = 0.0d;
SimpleDateFormat sdf = null;
Date relieveDate = null;
PayrollVoucherConfLocal payrollVoucherConf = null;
//Added & Commented by sarita to create object of PayrollVoucherConf instead PayrollVoucherConfLocal on 20 JULY 18.[START]
//PayrollVoucherConfLocal payrollVoucherConf = null;
PayrollVoucherConf payrollVoucherConf = new PayrollVoucherConf();
//Added & Commented by sarita to create object of PayrollVoucherConf instead PayrollVoucherConfLocal on 20 JULY 18.[START]
try
{
genericUtility = new E12GenericUtility();
appConnect = new AppConnectParm();
//Added & Commented by sarita to create object instead creating lookup for ITMDBAccessEJB on 20 JULY 18 [START]
/*appConnect = new AppConnectParm();
initialCtx = new InitialContext(appConnect.getProperty());
itmDBAccess = (ITMDBAccessLocal)initialCtx.lookup("ibase/ITMDBAccessEJB/local");
itmDBAccess = (ITMDBAccessLocal)initialCtx.lookup("ibase/ITMDBAccessEJB/local");*/
itmDBAccess = new ITMDBAccessEJB();
//Added & Commented by sarita to create object instead creating lookup for ITMDBAccessEJB on 20 JULY 18 [END]
loginEmpCode = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode"));
loginCode = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode"));
chgTerm = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams,"termId"));
......@@ -525,7 +537,8 @@ public class EmpMaritalStatusConf extends ActionHandlerEJB implements EmpMarital
if("Y".equalsIgnoreCase(autoPost))
{
payrollVoucherConf = (PayrollVoucherConfLocal)initialCtx.lookup("ibase/PayrollVoucherConf/local");
//Commented by sarita to remove lookup for PayrollVoucherConf and use object instead on 20 JULY 18
//payrollVoucherConf = (PayrollVoucherConfLocal)initialCtx.lookup("ibase/PayrollVoucherConf/local");
retString = checkNull(payrollVoucherConf.confirm(tranId, forcedFlag, xtraParams, connection));
if(retString.length() > 0 && retString.indexOf("VTMCONF2") == -1 )
{
......
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