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