Commit 868c58d0 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@187972 ce508802-f39f-4f6c-b175-0d175dae99d5
parent abc2810c
...@@ -30,9 +30,10 @@ public class HolChangeCanc extends ActionHandlerEJB implements HolChangeCancLoca ...@@ -30,9 +30,10 @@ public class HolChangeCanc extends ActionHandlerEJB implements HolChangeCancLoca
Connection conn = null; Connection conn = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
//Added & Commented by sarita to use object of ITMDBAccessEJB instead ITMDBAccessLocal on 20 JULY 18.[START]
ITMDBAccessLocal itmDBAccess = null; //ITMDBAccessLocal itmDBAccess = null;
ITMDBAccessEJB itmDBAccess = null;
//Added & Commented by sarita to use object of ITMDBAccessEJB instead ITMDBAccessLocal on 20 JULY 18.[END]
int updStatus = 0; int updStatus = 0;
String sql = ""; String sql = "";
...@@ -60,9 +61,12 @@ public class HolChangeCanc extends ActionHandlerEJB implements HolChangeCancLoca ...@@ -60,9 +61,12 @@ public class HolChangeCanc extends ActionHandlerEJB implements HolChangeCancLoca
System.out.println(" xtraParams [" + xtraParams + "] "); System.out.println(" xtraParams [" + xtraParams + "] ");
System.out.println(" forcedFlag [" + forcedFlag + "] "); System.out.println(" forcedFlag [" + forcedFlag + "] ");
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()); 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]
System.out.println(" I N S I D E C A S E "); System.out.println(" I N S I D E C A S E ");
System.out.println("tranId [" + tranId + "]"); System.out.println("tranId [" + tranId + "]");
...@@ -87,7 +91,6 @@ public class HolChangeCanc extends ActionHandlerEJB implements HolChangeCancLoca ...@@ -87,7 +91,6 @@ public class HolChangeCanc extends ActionHandlerEJB implements HolChangeCancLoca
System.out.println("TO DATE STRING AFTER DBDATE [" + holDateToSql + "]"); System.out.println("TO DATE STRING AFTER DBDATE [" + holDateToSql + "]");
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM"); conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false); conn.setAutoCommit(false);
...@@ -113,7 +116,10 @@ public class HolChangeCanc extends ActionHandlerEJB implements HolChangeCancLoca ...@@ -113,7 +116,10 @@ public class HolChangeCanc extends ActionHandlerEJB implements HolChangeCancLoca
} }
else else
{ {
retString = itmDBAccess.getErrorString("emp_code", "VTHOLCHG02", userID); //Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString("emp_code", "VTHOLCHG02", userID);
retString = itmDBAccess.getErrorString("emp_code","VTHOLCHG02",userID,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
} }
System.out.println(" confirm [" + confirm + "] "); System.out.println(" confirm [" + confirm + "] ");
...@@ -140,20 +146,28 @@ public class HolChangeCanc extends ActionHandlerEJB implements HolChangeCancLoca ...@@ -140,20 +146,28 @@ public class HolChangeCanc extends ActionHandlerEJB implements HolChangeCancLoca
System.out.println("canceled the request [::" + updStatus); System.out.println("canceled the request [::" + updStatus);
if(updStatus > 0) if(updStatus > 0)
{ {
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
retString = itmDBAccess.getErrorString("emp_code", "VTCANC1", userID); //retString = itmDBAccess.getErrorString("emp_code", "VTCANC1", userID);
retString = itmDBAccess.getErrorString("emp_code","VTCANC1",userID,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
conn.commit(); conn.commit();
} }
else else
{ {
retString = itmDBAccess.getErrorString("emp_code", "VTHOLCHG02", userID); //Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString("emp_code", "VTHOLCHG02", userID);
retString = itmDBAccess.getErrorString("emp_code","VTHOLCHG02",userID,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
conn.rollback(); conn.rollback();
} }
} }
else else
{ {
retString = itmDBAccess.getErrorString("emp_code", "VTCANC2", userID); //Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString("emp_code", "VTCANC2", userID);
retString = itmDBAccess.getErrorString("emp_code","VTCANC2",userID,"",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