Commit 6a8e6e20 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@187962 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 8103da87
......@@ -83,7 +83,10 @@ public class EmpLvePrkBalTrfCanc extends ActionHandlerEJB implements EmpLvePrkBa
{
PreparedStatement pstmt = null;
ResultSet rs = 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 retString="";
String sql = "";
String status="";
......@@ -92,9 +95,12 @@ public class EmpLvePrkBalTrfCanc extends ActionHandlerEJB implements EmpLvePrkBa
GenericUtility genericUtility = GenericUtility.getInstance();
try
{
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());
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]
String userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginEmpCode" );
......@@ -111,15 +117,24 @@ public class EmpLvePrkBalTrfCanc extends ActionHandlerEJB implements EmpLvePrkBa
if ( "R".equalsIgnoreCase( tranMode ) )
{
retString = itmDBAccess.getErrorString( "", "VTELPTRF12", userId );
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString( "", "VTELPTRF12", userId );
retString = itmDBAccess.getErrorString("","VTELPTRF12",userId,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
}
else if ( "C".equalsIgnoreCase( status ) )
{
retString = itmDBAccess.getErrorString( "", "VTELPTRF13", userId );
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString( "", "VTELPTRF13", userId );
retString = itmDBAccess.getErrorString("","VTELPTRF13",userId,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
}
else if( "X".equalsIgnoreCase( status ) )
{
retString = itmDBAccess.getErrorString( "", "VTELPTRF14", userId );
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString( "", "VTELPTRF14", userId );
retString = itmDBAccess.getErrorString("","VTELPTRF14",userId,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
}
else
{
......@@ -133,7 +148,10 @@ public class EmpLvePrkBalTrfCanc extends ActionHandlerEJB implements EmpLvePrkBa
if( updCnt > 0 )
{
conn.commit();
retString = itmDBAccess.getErrorString( "", "VTELPTRF15", userId );
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString( "", "VTELPTRF15", userId );
retString = itmDBAccess.getErrorString("","VTELPTRF15",userId,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
}
close( pstmt, rs );
}
......
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