Commit 2f431445 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@187997 ce508802-f39f-4f6c-b175-0d175dae99d5
parent fa2370d9
......@@ -13,7 +13,10 @@ import ibase.system.config.AppConnectParm;
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.utility.ITMException;
@Stateless
......@@ -28,16 +31,22 @@ public class PayrVouchCanc extends ActionHandlerEJB implements PayrVouchCancRemo
E12GenericUtility genericUtility = 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]
String loginCode = "";
try
{
conn = getConnection();
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]
loginCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
System.out.println("loginCode---["+loginCode+"]");
......@@ -49,7 +58,10 @@ public class PayrVouchCanc extends ActionHandlerEJB implements PayrVouchCancRemo
{
conn.commit();
System.out.println("Connection commit................");
retString = itmDBAccess.getErrorString( "", "VTCANC1" , loginCode);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString( "", "VTCANC1" , loginCode);
retString = itmDBAccess.getErrorString("","VTCANC1",loginCode,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
}
else
{
......@@ -112,14 +124,19 @@ public class PayrVouchCanc extends ActionHandlerEJB implements PayrVouchCancRemo
E12GenericUtility genericUtility = null;
AppConnectParm appConnect = null;
InitialContext initialCtx = null;
ITMDBAccessLocal itmDBAccess = null;
//Added & Commented by sarita to use object instead creating lookup for ITMDBAccessEJB on 20 JULY 18 [START]
//ITMDBAccessLocal itmDBAccess = null;
ITMDBAccessEJB itmDBAccess = null;
//Added & Commented by sarita to use object instead creating lookup for ITMDBAccessEJB on 20 JULY 18 [END]
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]
loginCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
System.out.println("loginCode---["+loginCode+"]");
......@@ -169,12 +186,18 @@ public class PayrVouchCanc extends ActionHandlerEJB implements PayrVouchCancRemo
//if("X".equalsIgnoreCase(status))
if("X".equalsIgnoreCase(confirmed))
{
retString = itmDBAccess.getErrorString( "", "VTCANC2" , loginCode);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString( "", "VTCANC2" , loginCode);
retString = itmDBAccess.getErrorString("","VTCANC2",loginCode,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
return retString;
}
if("Y".equalsIgnoreCase(confirmed))
{
retString = itmDBAccess.getErrorString( "", "VTCONF8" , loginCode);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString( "", "VTCONF8" , loginCode);
retString = itmDBAccess.getErrorString("","VTCONF8",loginCode,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
return retString;
}
else if("N".equalsIgnoreCase(confirmed) || confirmed == null)
......@@ -222,7 +245,10 @@ public class PayrVouchCanc extends ActionHandlerEJB implements PayrVouchCancRemo
}
else
{
retString = itmDBAccess.getErrorString( "", "VTCANC3" , loginCode);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString( "", "VTCANC3" , loginCode);
retString = itmDBAccess.getErrorString("","VTCANC3",loginCode,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
return retString;
}
}
......@@ -230,7 +256,10 @@ public class PayrVouchCanc extends ActionHandlerEJB implements PayrVouchCancRemo
{
System.out.println("SQL Exception from [PayrVouchCanc][confirm][" + se.getMessage()+ "]");
se.printStackTrace();
retString = itmDBAccess.getErrorString( "", "DS00000000" , loginCode);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString( "", "DS00000000" , loginCode);
retString = itmDBAccess.getErrorString("","DS00000000",loginCode,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
return retString;
}
catch( Exception e )
......
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