Commit dffdfb5b authored by jshaikh's avatar jshaikh
parent ab7bc538
......@@ -18,6 +18,7 @@ import java.sql.*;
import java.text.SimpleDateFormat;
import ibase.utility.E12GenericUtility;
import ibase.utility.UserInfoBean;
import ibase.webitm.utility.GenerateXmlFromDB;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
......@@ -35,12 +36,34 @@ import java.util.Calendar;
public class POBWizConf extends ActionHandlerEJB implements POBWizConfLocal, POBWizConfRemote
{
E12GenericUtility genericUtility= new E12GenericUtility();
public String pobConfirm(String tranId, String xtraParams, String forcedFlag)throws RemoteException, ITMException
public String pobConfirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException, ITMException
{
String userInfoStr = "";
String errString = "";
try
{
errString = pobConfirm(tranId, xtraParams, forcedFlag, userInfoStr);
System.out.println("userInfoStr of confirm::::: " +userInfoStr);
}
catch(Exception e)
{
System.out.println("Exception in [POBWizConf] confirm " + e.getMessage());
throw new ITMException(e);
}
return errString;
}
public String pobConfirm(String tranId, String xtraParams, String forcedFlag, String userInfoStr)throws RemoteException, ITMException
{
System.out.println(">>>>>>>>>>>>>>>>>>POBWizConf confirm called>>>>>>>>>>>>>>>>>>>");
String confirmed = "";
String sql = "";
String transDB = "";
Connection conn = null;
ConnDriver connDriver = new ConnDriver();
PreparedStatement pstmt = null;
String errString = null;
ResultSet rs = null;
......@@ -67,12 +90,24 @@ public class POBWizConf extends ActionHandlerEJB implements POBWizConfLocal, POB
FinCommon finCommon = null;
try
{
ConnDriver connDriver = null;
connDriver = new ConnDriver();
//Changes and Commented By Bhushan on 09-06-2016 :START
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//conn = getConnection();
//Changes and Commented By Bhushan on 09-06-2016 :END
if(userInfoStr != null && userInfoStr.trim().length() > 0)
{
UserInfoBean userInfo = new UserInfoBean(userInfoStr);
transDB = userInfo.getTransDB();
}
if (transDB != null && transDB.trim().length() > 0)
{
conn = connDriver.getConnectDB(transDB);
}
else
{
conn = connDriver.getConnectDB("DriverITM");
}
conn.setAutoCommit(false);
finCommon = new FinCommon();
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
......@@ -88,7 +123,7 @@ public class POBWizConf extends ActionHandlerEJB implements POBWizConfLocal, POB
System.out.println("Now the date is :=> " + sysDate);
if (tranId != null && tranId.trim().length() > 0)
{
System.out.println("@@@@@tranId"+tranId+"]");
System.out.println("@@@@@tranId "+tranId+"]");
sql = " select tran_id,tran_date,site_code,item_ser,order_type,cust_code,confirmed " +
" from pob_hdr where tran_id = ? ";
......@@ -729,8 +764,11 @@ public class POBWizConf extends ActionHandlerEJB implements POBWizConfLocal, POB
pStmt.close();
pStmt=null;
}
String entityCodeInit = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode");
retString = xml2dbObj.invokeWorkflowExternal(domAll, entityCodeInit, wrkflwInit, objName, refSer, tranId);
String entityCodeInit = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode");
//Commented & changed to method with connection by Jaffar S. on 13-11-18 [Start]
//retString = xml2dbObj.invokeWorkflowExternal(domAll, entityCodeInit, wrkflwInit, objName, refSer, tranId);
retString = xml2dbObj.invokeWorkflowExternal(domAll, entityCodeInit, wrkflwInit, objName, refSer, tranId, conn);
//Commented & changed to method with connection by Jaffar S. on 13-11-18 [End]
System.out.println(">>>retString From xml2dbObj.invokeWorkflowExternal:"+retString);
}
catch(Exception ex)
......
......@@ -18,6 +18,7 @@ import javax.ejb.Local; // added for ejb3
public interface POBWizConfLocal extends ActionHandlerLocal
{
public String pobConfirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException;
public String pobConfirm(String tranId, String xtraParams, String forcedFlag, String userInfoStr) throws RemoteException,ITMException;
//public String submit(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException;
public String confirm(String tranId, String xtraParams,String forcedFlag) throws RemoteException, ITMException;
......
......@@ -16,6 +16,7 @@ import javax.ejb.Remote; // added for ejb3
public interface POBWizConfRemote extends ActionHandlerRemote
{
public String pobConfirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException;
public String pobConfirm(String tranId, String xtraParams, String forcedFlag, String userInfoStr) throws RemoteException,ITMException;
//public String submit(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException;
public String confirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException, ITMException;
}
......@@ -9,6 +9,7 @@ package ibase.webitm.ejb.dis.adv;
import ibase.system.config.AppConnectParm;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.utility.UserInfoBean;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.dis.DistCommon;
import ibase.webitm.utility.ITMException;
......@@ -28,7 +29,30 @@ import org.w3c.dom.NodeList;
public class POBWizWfConf
{
public String confirm(String tranId, String empCodeAprv, String xmlDataAll, String processId, String keyFlag)
//Changes made by Jaffar S. for multi tenancy[Userinfo] on 13-11-18 [Start]
public String confirm(String tranId, String empCodeAprv, String xmlDataAll, String processId, String keyFlag)throws RemoteException, ITMException
{
String userInfoStr = "";
String errString = "";
try
{
userInfoStr = confirm(tranId, empCodeAprv, xmlDataAll, processId, keyFlag, userInfoStr);
System.out.println("userInfoStr of confirm::::: " +userInfoStr);
}
catch(Exception e)
{
System.out.println("Exception in [POBWizWfConf] confirm " + e.getMessage());
throw new ITMException(e);
}
return errString;
}
//Changes made by Jaffar S. for multi tenancy[Userinfo] on 13-11-18 [End]
public String confirm(String tranId, String empCodeAprv, String xmlDataAll, String processId, String keyFlag, String userInfoStr)
throws RemoteException, ITMException
{
System.out.println(">>>>> POBWizWfConf confirm called <<<<<");
......@@ -57,10 +81,31 @@ public class POBWizWfConf
POBWizConf pobWizConfLocal=null;
try
{
conn = connDriver.getConnectDB("DriverITM");
//Commented and changes done for passing UserInfo by Jaffar S. on 12/11/18 [Start]
/*conn = connDriver.getConnectDB("DriverITM");
//conn = getConnection();
connDriver = null;
conn.setAutoCommit(false);*/
System.out.println("Inside Try block of POBWizWfConf.confirm()");
System.out.println("Inside POBWizWfConf confirm section: "+userInfoStr);
UserInfoBean userInfo = new UserInfoBean(userInfoStr);
String transDB = userInfo.getTransDB();
System.out.println("get TransDB connection in POBWizWfConf : "+transDB);
if (transDB != null && transDB.trim().length() > 0)
{
conn = connDriver.getConnectDB(transDB);
}
else
{
conn = connDriver.getConnectDB("DriverITM");
}
connDriver = null;
conn.setAutoCommit(false);
//Commented and changes done for passing UserInfo by Jaffar S. on 12/11/18 [End]
DistCommon distCommon= new DistCommon();
if(empCodeAprv!=null && empCodeAprv.trim().length() >0)
......
This diff is collapsed.
This diff is collapsed.
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