Commit abc2810c 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@187971 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f3b16192
......@@ -77,7 +77,8 @@ public class EmployeeSecuritySubmit extends ActionHandlerEJB implements Employee
ConnDriver connDriver = null;
InitialContext initialCtx = null;
ITMDBAccessLocal itmDBAccess = null;
//Commented by sarita to use ItmDBAccessEJB instead ITMDBAccessLocal on 20 JULY 18
//ITMDBAccessLocal itmDBAccess = null;
AppConnectParm appConnect = null;
// ArrayList<String> errList = new ArrayList<String>();
......@@ -95,16 +96,16 @@ public class EmployeeSecuritySubmit extends ActionHandlerEJB implements Employee
try
{
connDriver = new ConnDriver();
{
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
conn.setAutoCommit(false);
appConnect = new AppConnectParm();
conn.setAutoCommit(false);
//Commeneted 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");*/
//Commeneted by sarita to create object instead creating lookup for ITMDBAccessEJB on 20 JULY 18 [END]
Calendar currentDate = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
......@@ -141,7 +142,10 @@ public class EmployeeSecuritySubmit extends ActionHandlerEJB implements Employee
{
// errList.add("VTALRDCACL");
// errFields.add("status");
errString = itmDBAccess.getErrorString("", "VTALRDCACL", "", "", conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//errString = itmDBAccess.getErrorString("", "VTALRDCACL", "", "", conn);
errString = itmDBAccessEJB.getErrorString("", "VTALRDCACL", "", "", conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
return errString;
}
/**
......@@ -151,7 +155,10 @@ public class EmployeeSecuritySubmit extends ActionHandlerEJB implements Employee
{
// errList.add("VTALRDSUB");
// errFields.add("status");
errString = itmDBAccess.getErrorString("", "VTALRDSUB", "", "", conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//errString = itmDBAccess.getErrorString("", "VTALRDSUB", "", "", conn);
errString = itmDBAccessEJB.getErrorString("", "VTALRDSUB", "", "", conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
return errString;
}
else
......@@ -170,14 +177,20 @@ public class EmployeeSecuritySubmit extends ActionHandlerEJB implements Employee
/**
* Submit success
* */
errString = itmDBAccess.getErrorString("", "VTSUBSUCSS", "", "", conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//errString = itmDBAccess.getErrorString("", "VTSUBSUCSS", "", "", conn);
errString = itmDBAccessEJB.getErrorString("", "VTSUBSUCSS", "", "", conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
}
else
{
/**
* Submit fail
* */
errString = itmDBAccess.getErrorString("", "VTSUBFAIL", "", "", conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//errString = itmDBAccess.getErrorString("", "VTSUBFAIL", "", "", conn);
errString = itmDBAccessEJB.getErrorString("", "VTSUBFAIL", "", "", 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