Commit e882f972 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@187954 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 5cecef08
......@@ -4,7 +4,8 @@ import ibase.system.config.AppConnectParm;
import ibase.utility.E12GenericUtility;
import ibase.webitm.bean.sys.ProteusDataSource;
import ibase.webitm.ejb.ActionHandlerEJB;
import ibase.webitm.ejb.ITMDBAccessLocal;
import ibase.webitm.ejb.ITMDBAccessEJB;
//import ibase.webitm.ejb.ITMDBAccessLocal;
import ibase.webitm.ejb.adm.AdmCommon;
import ibase.webitm.ejb.adm.AttdProcess;
import ibase.webitm.ejb.adm.LeaveEncase;
......@@ -85,7 +86,10 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
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]
if (genericUtility == null)
{
......@@ -111,9 +115,13 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
this.termId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId");
this.loginEmpCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode");
appConnect = new AppConnectParm();
initialCtx = new InitialContext(appConnect.getProperty());
itmDBAccess = (ITMDBAccessLocal)initialCtx.lookup("ibase/ITMDBAccessEJB/local");
//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 = new ITMDBAccessEJB();
//Added & Commented by sarita to create object instead creating lookup for ITMDBAccessEJB on 20 JULY 18 [END]
if (this.leaveXmlData != null && this.leaveXmlData.trim().length() > 0)
{
this.proteusDataSource = new ProteusDataSource("empLeave", this.leaveXmlData, 1);
......@@ -135,8 +143,10 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
errCode = (String)this.errList.get(cnt);
errFldName = (String)this.fldList.get(cnt);
System.out.println("errCode .........."+errCode);
errString = itmDBAccess.getErrorString( errFldName, errCode, this.userId );
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//errString = itmDBAccess.getErrorString( errFldName, errCode, this.userId );
errString = itmDBAccess.getErrorString(errFldName,errCode,this.userId,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
errorType = getErrorType( errCode , conn );
if ( errorType.equalsIgnoreCase("E"))
{
......@@ -153,7 +163,10 @@ public class EmpLeaveCancel extends ActionHandlerEJB implements EmpLeaveCancelL
if (errString == null || errString.trim().length() == 0)
{
conn.commit();
errString = itmDBAccess.getErrorString( "", "VTLVECAR01" , this.userId );
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//errString = itmDBAccess.getErrorString( "", "VTLVECAR01" , this.userId );
errString = itmDBAccess.getErrorString("","VTLVECAR01",this.userId,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
}
else
{
......
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