Commit fa2370d9 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@187993 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ee58d714
......@@ -13,7 +13,10 @@ import javax.naming.InitialContext;
import ibase.system.config.AppConnectParm;
import ibase.system.config.ConnDriver;
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.GenericUtility;
import ibase.webitm.utility.ITMException;
......@@ -31,9 +34,10 @@ public class MPReqmntConfirmation extends ActionHandlerEJB implements MPReqmntCo
try
{
ConnDriver connDriver = new ConnDriver();
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false);
System.out.println("tranID::::::::::"+tranID);
resultStr = mpreqApprove(tranID,xtraParams, forcedFlag, conn);
......@@ -76,7 +80,10 @@ public class MPReqmntConfirmation extends ActionHandlerEJB implements MPReqmntCo
String apprvDateStr="",errString="",approved="",logCode="";
boolean isError =false;
int cnt = 0;
ITMDBAccessLocal itmdbAccessLocal = null ;
//Added & Commented by sarita to use object of ITMDBAccessEJB instead ITMDBAccessLocal on 20 JULY 18.[start]
//ITMDBAccessLocal itmdbAccessLocal = null ;
ITMDBAccessEJB itmDBAccess = null;
//Added & Commented by sarita to use object of ITMDBAccessEJB instead ITMDBAccessLocal on 20 JULY 18.[end]
PreparedStatement pstmt =null;
ResultSet rs = null;
GenericUtility genericUtility = GenericUtility.getInstance();
......@@ -84,10 +91,13 @@ public class MPReqmntConfirmation extends ActionHandlerEJB implements MPReqmntCo
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();
Properties p = appConnect.getProperty();
InitialContext ctx = new InitialContext(p);
itmdbAccessLocal = (ITMDBAccessLocal)ctx.lookup("ibase/ITMDBAccessEJB/local");
itmdbAccessLocal = (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]
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
java.util.Date currDate = new java.util.Date();
apprvDateStr = sdf.format(currDate);
......@@ -119,7 +129,10 @@ public class MPReqmntConfirmation extends ActionHandlerEJB implements MPReqmntCo
if ((approved != null && approved.trim().length() > 0) && approved.trim().equals("Y"))
{
isError = true;
errString = itmdbAccessLocal.getErrorString("","VTCONFDUP","");
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//errString = itmdbAccessLocal.getErrorString("","VTCONFDUP","");
errString = itmDBAccess.getErrorString("","VTCONFDUP","","",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
return errString;
}
else
......@@ -136,7 +149,10 @@ public class MPReqmntConfirmation extends ActionHandlerEJB implements MPReqmntCo
else
{
isError = true;
errString = itmdbAccessLocal.getErrorString("","VTMCONF20","");
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//errString = itmdbAccessLocal.getErrorString("","VTMCONF20","");
errString = itmDBAccess.getErrorString("","VTMCONF20","","",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
return errString;
}
......@@ -163,7 +179,10 @@ public class MPReqmntConfirmation extends ActionHandlerEJB implements MPReqmntCo
System.out.println("Commiting Changes......");
conn.commit();
isError = true;
errString = itmdbAccessLocal.getErrorString("","VTCONF","");
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//errString = itmdbAccessLocal.getErrorString("","VTCONF","");
errString = itmDBAccess.getErrorString("","VTCONF","","",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
return errString;
}
......
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