Commit 28074536 authored by ssalve's avatar ssalve

changes done for DBConnection


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@105722 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a2432442
...@@ -57,9 +57,12 @@ public class AcctprdGenPrd extends ActionHandlerEJB implements AcctprdGenPrdLoca ...@@ -57,9 +57,12 @@ public class AcctprdGenPrd extends ActionHandlerEJB implements AcctprdGenPrdLoca
try try
{ {
ConnDriver connDriver = new ConnDriver(); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn = connDriver.getConnectDB("DriverITM"); //ConnDriver connDriver = new ConnDriver();
connDriver = null; //conn = connDriver.getConnectDB("DriverITM");
//connDriver = null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
//changes and commented by sarita 31/05/2017 //changes and commented by sarita 31/05/2017
//GenericUtility genericUtility = GenericUtility.getInstance(); //GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
......
...@@ -61,8 +61,11 @@ public class CallConfirmService extends ActionHandlerEJB implements CallConfirmS ...@@ -61,8 +61,11 @@ public class CallConfirmService extends ActionHandlerEJB implements CallConfirmS
ResultSet rsSysEvent,rsSysEvService; ResultSet rsSysEvent,rsSysEvService;
String xtraParams =""; String xtraParams ="";
try{ try{
ConnDriver connDriver = new ConnDriver(); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn = connDriver.getConnectDB("DriverITM"); //ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
//changes and commented by sarita 31/05/2017 //changes and commented by sarita 31/05/2017
//GenericUtility genericUtility = GenericUtility.getInstance(); //GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
......
...@@ -140,8 +140,11 @@ public class ColumnProperty extends ValidatorEJB implements ColumnPropertyLocal, ...@@ -140,8 +140,11 @@ public class ColumnProperty extends ValidatorEJB implements ColumnPropertyLocal,
try try
{ {
connDriver = new ConnDriver(); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn = connDriver.getConnectDB("DriverITM");//Gets a Connection //connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");//Gets a Connection
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
//changes and commented by sarita on 31/05/2017 //changes and commented by sarita on 31/05/2017
//GenericUtility genericUtility = GenericUtility.getInstance(); //GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
......
...@@ -88,9 +88,11 @@ public class ContactIC extends ValidatorEJB implements ContactICLocal, ContactIC ...@@ -88,9 +88,11 @@ public class ContactIC extends ValidatorEJB implements ContactICLocal, ContactIC
System.out.println("Station Val Start"); System.out.println("Station Val Start");
try try
{ {
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
//conn = connDriver.getConnectDB("DriverITM");
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
parentNodeList = dom.getElementsByTagName("Detail1"); parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
...@@ -302,10 +304,12 @@ public class ContactIC extends ValidatorEJB implements ContactICLocal, ContactIC ...@@ -302,10 +304,12 @@ public class ContactIC extends ValidatorEJB implements ContactICLocal, ContactIC
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
try try
{ {
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn.setAutoCommit(false); //conn = connDriver.getConnectDB("DriverITM");
connDriver = null; //conn.setAutoCommit(false);
//connDriver = null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
valueXmlString = new StringBuffer("<?xml version = \"1.0\"?> <Root> <header> <editFlag>"); valueXmlString = new StringBuffer("<?xml version = \"1.0\"?> <Root> <header> <editFlag>");
valueXmlString.append(editFlag).append("</editFlag> </header>"); valueXmlString.append(editFlag).append("</editFlag> </header>");
......
...@@ -87,7 +87,10 @@ public class CountryIC extends ValidatorEJB implements CountryICLocal, CountryIC ...@@ -87,7 +87,10 @@ public class CountryIC extends ValidatorEJB implements CountryICLocal, CountryIC
{ {
this.finCommon = new FinCommon(); this.finCommon = new FinCommon();
this.validator = new ValidatorEJB(); this.validator = new ValidatorEJB();
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
if ((objContext != null) && (objContext.trim().length() > 0)) if ((objContext != null) && (objContext.trim().length() > 0))
{ {
...@@ -434,9 +437,12 @@ public class CountryIC extends ValidatorEJB implements CountryICLocal, CountryIC ...@@ -434,9 +437,12 @@ public class CountryIC extends ValidatorEJB implements CountryICLocal, CountryIC
try try
{ {
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn.setAutoCommit(false); //conn = connDriver.getConnectDB("DriverITM");
connDriver = null; //conn.setAutoCommit(false);
//connDriver = null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
this.finCommon = new FinCommon(); this.finCommon = new FinCommon();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
if ((objContext != null) && (objContext.trim().length() > 0)) if ((objContext != null) && (objContext.trim().length() > 0))
......
...@@ -55,9 +55,12 @@ public class CreateBatchPrc extends ProcessEJB implements CreateBatchPrcLocal , ...@@ -55,9 +55,12 @@ public class CreateBatchPrc extends ProcessEJB implements CreateBatchPrcLocal ,
try try
{ {
itmDBAccessEJB = new ITMDBAccessEJB(); itmDBAccessEJB = new ITMDBAccessEJB();
ConnDriver conndriver = new ConnDriver(); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn = conndriver.getConnectDB("DriverITM"); //ConnDriver conndriver = new ConnDriver();
conn.setAutoCommit(false); //conn = conndriver.getConnectDB("DriverITM");
//conn.setAutoCommit(false);
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
commonConstants = new CommonConstants(); commonConstants = new CommonConstants();
System.out.println("CreateBatchPrcEJB ejbCreate called........."); System.out.println("CreateBatchPrcEJB ejbCreate called.........");
} }
...@@ -982,8 +985,11 @@ public String generateBatchNo() ...@@ -982,8 +985,11 @@ public String generateBatchNo()
String tranId = null; String tranId = null;
try try
{ {
ConnDriver conndriver = new ConnDriver(); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn1 = conndriver.getConnectDB("DriverITM"); //ConnDriver conndriver = new ConnDriver();
//conn1 = conndriver.getConnectDB("DriverITM");
conn1 = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
keyStringQuery = "SELECT KEY_STRING, TRAN_ID_COL, REF_SER FROM TRANSETUP WHERE UPPER(TRAN_WINDOW) = 'I-BL'"; keyStringQuery = "SELECT KEY_STRING, TRAN_ID_COL, REF_SER FROM TRANSETUP WHERE UPPER(TRAN_WINDOW) = 'I-BL'";
System.out.println("keyStringQuery::"+keyStringQuery); System.out.println("keyStringQuery::"+keyStringQuery);
lstmt = conn1.createStatement(); lstmt = conn1.createStatement();
......
...@@ -73,8 +73,11 @@ public class DeviceAuthentication extends ValidatorEJB implements DeviceAuthenti ...@@ -73,8 +73,11 @@ public class DeviceAuthentication extends ValidatorEJB implements DeviceAuthenti
try try
{ {
conn=connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
connDriver=null; //conn=connDriver.getConnectDB("DriverITM");
//connDriver=null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
userId=getValueFromXTRA_PARAMS(xtraParams,"loginCode"); userId=getValueFromXTRA_PARAMS(xtraParams,"loginCode");
System.out.println("1---currentFormNo-------"+currentFormNo); System.out.println("1---currentFormNo-------"+currentFormNo);
if(objContext!=null && objContext.trim().length()>0) if(objContext!=null && objContext.trim().length()>0)
...@@ -281,9 +284,12 @@ public class DeviceAuthentication extends ValidatorEJB implements DeviceAuthenti ...@@ -281,9 +284,12 @@ public class DeviceAuthentication extends ValidatorEJB implements DeviceAuthenti
try try
{ {
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn.setAutoCommit(false); //conn = connDriver.getConnectDB("DriverITM");
connDriver=null; //conn.setAutoCommit(false);
//connDriver=null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
if(objContext != null && objContext.trim().length()>0) if(objContext != null && objContext.trim().length()>0)
{ {
currentFormNo = Integer.parseInt(objContext); currentFormNo = Integer.parseInt(objContext);
......
...@@ -90,7 +90,10 @@ E12GenericUtility genericUtility = new E12GenericUtility(); ...@@ -90,7 +90,10 @@ E12GenericUtility genericUtility = new E12GenericUtility();
try try
{ {
SimpleDateFormat simpleDateFormatObj = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat simpleDateFormatObj = new SimpleDateFormat(genericUtility.getApplDateFormat());
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode"); userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
System.out.println("user ID form XtraParam : "+userId +"Edit Flag -->>: "+editFlag); System.out.println("user ID form XtraParam : "+userId +"Edit Flag -->>: "+editFlag);
...@@ -352,9 +355,12 @@ E12GenericUtility genericUtility = new E12GenericUtility(); ...@@ -352,9 +355,12 @@ E12GenericUtility genericUtility = new E12GenericUtility();
Calendar currentDate = Calendar.getInstance(); Calendar currentDate = Calendar.getInstance();
String tranDate = simpleDateFormatObj.format(currentDate.getTime()); String tranDate = simpleDateFormatObj.format(currentDate.getTime());
String contactPer = ""; String contactPer = "";
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn.setAutoCommit(false); //conn = connDriver.getConnectDB("DriverITM");
connDriver=null; //conn.setAutoCommit(false);
//connDriver=null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :ENd
if(objContext != null && objContext.trim().length()>0) if(objContext != null && objContext.trim().length()>0)
{ {
currentFormNo = Integer.parseInt(objContext.trim()); currentFormNo = Integer.parseInt(objContext.trim());
......
...@@ -108,10 +108,13 @@ public class GenValidate extends ValidatorEJB implements GenValidateLocal , Gen ...@@ -108,10 +108,13 @@ public class GenValidate extends ValidatorEJB implements GenValidateLocal , Gen
if(conn==null) if(conn==null)
{ {
System.out.println(" create isLocalConn for wfValData "); System.out.println(" create isLocalConn for wfValData ");
ConnDriver connDriver = null; //changes and commented by sarita for DBConnection on 01/06/2017 :START
connDriver = new ConnDriver(); //ConnDriver connDriver = null;
conn = connDriver.getConnectDB("DriverITM"); //connDriver = new ConnDriver();
conn.setAutoCommit(false); //conn = connDriver.getConnectDB("DriverITM");
//conn.setAutoCommit(false);
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
isLocalConn=true; isLocalConn=true;
} }
//***ConnDriver connDriver = new ConnDriver(); //***ConnDriver connDriver = new ConnDriver();
...@@ -310,10 +313,13 @@ public class GenValidate extends ValidatorEJB implements GenValidateLocal , Gen ...@@ -310,10 +313,13 @@ public class GenValidate extends ValidatorEJB implements GenValidateLocal , Gen
if(conn==null) if(conn==null)
{ {
System.out.println(" create isLocalConn for wfValData1 "); System.out.println(" create isLocalConn for wfValData1 ");
ConnDriver connDriver = null; //changes and commented by sarita for DBConnection on 01/06/2017 :START
connDriver = new ConnDriver(); //ConnDriver connDriver = null;
conn = connDriver.getConnectDB("DriverITM"); //connDriver = new ConnDriver();
conn.setAutoCommit(false); //conn = connDriver.getConnectDB("DriverITM");
//conn.setAutoCommit(false);
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
isLocalConn=true; isLocalConn=true;
} }
//***ConnDriver connDriver = new ConnDriver(); //***ConnDriver connDriver = new ConnDriver();
......
...@@ -138,14 +138,14 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP ...@@ -138,14 +138,14 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP
//genericUtility = new GenericUtility(); //genericUtility = new GenericUtility();
genericUtility = new E12GenericUtility(); genericUtility = new E12GenericUtility();
itmDBAccessEJB = new ITMDBAccessEJB(); itmDBAccessEJB = new ITMDBAccessEJB();
connDriver = new ConnDriver(); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn = connDriver.getConnectDB("DriverITM"); //connDriver = new ConnDriver();
connDriver = null; //conn = connDriver.getConnectDB("DriverITM");
//connDriver = null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
workOrder=genericUtility.getColumnValue("work_order", dom); workOrder=genericUtility.getColumnValue("work_order", dom);
eventNo=genericUtility.getColumnValue("event_no", dom); eventNo=genericUtility.getColumnValue("event_no", dom);
activitySet=genericUtility.getColumnValue("activity_set", dom); activitySet=genericUtility.getColumnValue("activity_set", dom);
...@@ -357,10 +357,13 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP ...@@ -357,10 +357,13 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP
{ {
System.out.println("------insertWorderTrack-----"); System.out.println("------insertWorderTrack-----");
Date currentDate = new Date(); Date currentDate = new Date();
ConnDriver connDriver = new ConnDriver(); //changes and commented by sarita for DBConnection on 01/06/2017 :START
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM"); //conn = connDriver.getConnectDB("DriverITM");
//connDriver = null; //connDriver = null;
conn.setAutoCommit(false); //conn.setAutoCommit(false);
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
currDate = new java.sql.Timestamp(System.currentTimeMillis()); currDate = new java.sql.Timestamp(System.currentTimeMillis());
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getDBDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getDBDateFormat());
//Date date = sdf.parse(currDate.toString()); //Date date = sdf.parse(currDate.toString());
......
...@@ -47,9 +47,12 @@ public class LoadBatch extends ActionHandlerEJB implements LoadBatchLocal,LoadBa ...@@ -47,9 +47,12 @@ public class LoadBatch extends ActionHandlerEJB implements LoadBatchLocal,LoadBa
System.out.println("tranId----"+tranId); System.out.println("tranId----"+tranId);
try try
{ {
conn = ConnDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn.setAutoCommit(false); //conn = ConnDriver.getConnectDB("DriverITM");
ITMDBAccessEJB itmDBAccess = new ITMDBAccessEJB(); //conn.setAutoCommit(false);
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
ITMDBAccessEJB itmDBAccess = new ITMDBAccessEJB();
System.out.println("xtraParams----"+xtraParams); System.out.println("xtraParams----"+xtraParams);
System.out.println("forcedFlag----"+forcedFlag); System.out.println("forcedFlag----"+forcedFlag);
tranId=tranId.substring(0,tranId.indexOf(":")); tranId=tranId.substring(0,tranId.indexOf(":"));
......
...@@ -78,9 +78,11 @@ public class MessagesLevel extends ValidatorEJB implements MessagesLevelLocal, M ...@@ -78,9 +78,11 @@ public class MessagesLevel extends ValidatorEJB implements MessagesLevelLocal, M
String sql=""; String sql="";
try try
{ {
ConnDriver connDriver = new ConnDriver(); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn = connDriver.getConnectDB("DriverITM"); //ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
loginSite = getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode"); loginSite = getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
//changes and commented by sarita on 31/05/2017 //changes and commented by sarita on 31/05/2017
...@@ -298,10 +300,13 @@ public class MessagesLevel extends ValidatorEJB implements MessagesLevelLocal, M ...@@ -298,10 +300,13 @@ public class MessagesLevel extends ValidatorEJB implements MessagesLevelLocal, M
timestamp = new Timestamp(System.currentTimeMillis()); timestamp = new Timestamp(System.currentTimeMillis());
// siteCode = getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode"); // siteCode = getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
ConnDriver conndriver = new ConnDriver(); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn = conndriver.getConnectDB("DriverITM"); //ConnDriver conndriver = new ConnDriver();
conn.setAutoCommit(false); //conn = conndriver.getConnectDB("DriverITM");
conndriver = null; //conn.setAutoCommit(false);
//conndriver = null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
if (objContext != null && objContext.trim().length() > 0) if (objContext != null && objContext.trim().length() > 0)
currentFormNo = Integer.parseInt(objContext); currentFormNo = Integer.parseInt(objContext);
......
...@@ -146,8 +146,11 @@ public class RoleMaster extends ValidatorEJB implements RoleMasterLocal, RoleMas ...@@ -146,8 +146,11 @@ public class RoleMaster extends ValidatorEJB implements RoleMasterLocal, RoleMas
//StringBuffer valueXmlString = new StringBuffer(); //StringBuffer valueXmlString = new StringBuffer();
try try
{ {
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
connDriver = null; //conn = connDriver.getConnectDB("DriverITM");
//connDriver = null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
userId = getValueFromXTRA_PARAMS(xtraParams,"loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams,"loginCode");
if(objContext != null && objContext.trim().length()>0) if(objContext != null && objContext.trim().length()>0)
...@@ -560,9 +563,12 @@ public class RoleMaster extends ValidatorEJB implements RoleMasterLocal, RoleMas ...@@ -560,9 +563,12 @@ public class RoleMaster extends ValidatorEJB implements RoleMasterLocal, RoleMas
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
try try
{ {
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn.setAutoCommit(false); //conn = connDriver.getConnectDB("DriverITM");
connDriver=null; //conn.setAutoCommit(false);
//connDriver=null;
conn =getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
if(objContext != null && objContext.trim().length()>0) if(objContext != null && objContext.trim().length()>0)
{ {
......
...@@ -96,7 +96,10 @@ public class SiteIC extends ValidatorEJB implements SiteICLocal, SiteICRemote ...@@ -96,7 +96,10 @@ public class SiteIC extends ValidatorEJB implements SiteICLocal, SiteICRemote
try try
{ {
SimpleDateFormat sdf1= new SimpleDateFormat(genericUtility.getDBDateFormat()); SimpleDateFormat sdf1= new SimpleDateFormat(genericUtility.getDBDateFormat());
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
if (objContext != null && objContext.trim().length() > 0) if (objContext != null && objContext.trim().length() > 0)
{ {
...@@ -748,10 +751,13 @@ public class SiteIC extends ValidatorEJB implements SiteICLocal, SiteICRemote ...@@ -748,10 +751,13 @@ public class SiteIC extends ValidatorEJB implements SiteICLocal, SiteICRemote
String empCode="",empFName="",empLName="",stateDescr="",siteCode=""; String empCode="",empFName="",empLName="",stateDescr="",siteCode="";
try try
{ {
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn.setAutoCommit(false); //conn = connDriver.getConnectDB("DriverITM");
connDriver = null; //conn.setAutoCommit(false);
//connDriver = null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
if (objContext != null && objContext.trim().length() > 0) if (objContext != null && objContext.trim().length() > 0)
{ {
currentFormNo = Integer.parseInt(objContext.trim()); currentFormNo = Integer.parseInt(objContext.trim());
......
...@@ -77,8 +77,11 @@ public class SiteRegNoIC extends ValidatorEJB implements SiteRegNoICLocal,SiteRe ...@@ -77,8 +77,11 @@ public class SiteRegNoIC extends ValidatorEJB implements SiteRegNoICLocal,SiteRe
try try
{ {
System.out.println("@@@@@@@@ wfvaldata called"); System.out.println("@@@@@@@@ wfvaldata called");
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
connDriver = null; //conn = connDriver.getConnectDB("DriverITM");
//connDriver = null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
userId = getValueFromXTRA_PARAMS(xtraParams,"loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams,"loginCode");
if(objContext != null && objContext.trim().length()>0) if(objContext != null && objContext.trim().length()>0)
{ {
...@@ -425,9 +428,12 @@ public class SiteRegNoIC extends ValidatorEJB implements SiteRegNoICLocal,SiteRe ...@@ -425,9 +428,12 @@ public class SiteRegNoIC extends ValidatorEJB implements SiteRegNoICLocal,SiteRe
try try
{ {
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn.setAutoCommit(false); //conn = connDriver.getConnectDB("DriverITM");
connDriver=null; //conn.setAutoCommit(false);
//connDriver=null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
if(objContext != null && objContext.trim().length()>0) if(objContext != null && objContext.trim().length()>0)
{ {
currentFormNo = Integer.parseInt(objContext.trim()); currentFormNo = Integer.parseInt(objContext.trim());
......
...@@ -93,7 +93,10 @@ public class StateIC extends ValidatorEJB implements StateICLocal, StateICRemote ...@@ -93,7 +93,10 @@ public class StateIC extends ValidatorEJB implements StateICLocal, StateICRemote
simpleDateFormat1 = new SimpleDateFormat(genericUtility.getApplDateFormat()); simpleDateFormat1 = new SimpleDateFormat(genericUtility.getApplDateFormat());
currDate = new java.sql.Timestamp(System.currentTimeMillis()) ; currDate = new java.sql.Timestamp(System.currentTimeMillis()) ;
currAppdate = new SimpleDateFormat(genericUtility.getApplDateFormat()).format(currDate); currAppdate = new SimpleDateFormat(genericUtility.getApplDateFormat()).format(currDate);
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
if (objContext != null && objContext.trim().length() > 0) if (objContext != null && objContext.trim().length() > 0)
{ {
currentFormNo = Integer.parseInt(objContext); currentFormNo = Integer.parseInt(objContext);
...@@ -493,10 +496,12 @@ public class StateIC extends ValidatorEJB implements StateICLocal, StateICRemote ...@@ -493,10 +496,12 @@ public class StateIC extends ValidatorEJB implements StateICLocal, StateICRemote
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
try try
{ {
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn.setAutoCommit(false); //conn = connDriver.getConnectDB("DriverITM");
connDriver = null; //conn.setAutoCommit(false);
//connDriver = null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
if ((objContext != null) && (objContext.trim().length() > 0)) if ((objContext != null) && (objContext.trim().length() > 0))
{ {
......
...@@ -106,7 +106,10 @@ public class TrackActivityMaster extends ValidatorEJB implements TrackActivityMa ...@@ -106,7 +106,10 @@ public class TrackActivityMaster extends ValidatorEJB implements TrackActivityMa
{ {
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
if(objContext != null && objContext.trim().length() > 0) if(objContext != null && objContext.trim().length() > 0)
...@@ -423,9 +426,12 @@ public class TrackActivityMaster extends ValidatorEJB implements TrackActivityMa ...@@ -423,9 +426,12 @@ public class TrackActivityMaster extends ValidatorEJB implements TrackActivityMa
try try
{ {
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn.setAutoCommit(false); //conn = connDriver.getConnectDB("DriverITM");
connDriver = null; //conn.setAutoCommit(false);
//connDriver = null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
if(objContext != null && objContext.trim().length() > 0) if(objContext != null && objContext.trim().length() > 0)
{ {
currentFormNo = Integer.parseInt(objContext); currentFormNo = Integer.parseInt(objContext);
......
...@@ -118,7 +118,10 @@ public class TrackReqMaster extends ValidatorEJB implements TrackReqMasterLocal, ...@@ -118,7 +118,10 @@ public class TrackReqMaster extends ValidatorEJB implements TrackReqMasterLocal,
{ {
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
if(objContext != null && objContext.trim().length() > 0) if(objContext != null && objContext.trim().length() > 0)
...@@ -557,9 +560,12 @@ public class TrackReqMaster extends ValidatorEJB implements TrackReqMasterLocal, ...@@ -557,9 +560,12 @@ public class TrackReqMaster extends ValidatorEJB implements TrackReqMasterLocal,
try try
{ {
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn.setAutoCommit(false); //conn = connDriver.getConnectDB("DriverITM");
connDriver = null; //conn.setAutoCommit(false);
//connDriver = null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
if(objContext != null && objContext.trim().length() > 0) if(objContext != null && objContext.trim().length() > 0)
{ {
currentFormNo = Integer.parseInt(objContext); currentFormNo = Integer.parseInt(objContext);
......
...@@ -111,7 +111,10 @@ public class TrackSetMaster extends ValidatorEJB implements TrackSetMasterLocal, ...@@ -111,7 +111,10 @@ public class TrackSetMaster extends ValidatorEJB implements TrackSetMasterLocal,
{ {
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
if(objContext != null && objContext.trim().length() > 0) if(objContext != null && objContext.trim().length() > 0)
...@@ -557,9 +560,12 @@ public class TrackSetMaster extends ValidatorEJB implements TrackSetMasterLocal, ...@@ -557,9 +560,12 @@ public class TrackSetMaster extends ValidatorEJB implements TrackSetMasterLocal,
try try
{ {
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn.setAutoCommit(false); //conn = connDriver.getConnectDB("DriverITM");
connDriver = null; //conn.setAutoCommit(false);
//connDriver = null;
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
if(objContext != null && objContext.trim().length() > 0) if(objContext != null && objContext.trim().length() > 0)
{ {
currentFormNo = Integer.parseInt(objContext); currentFormNo = Integer.parseInt(objContext);
......
...@@ -51,8 +51,11 @@ public class UpdateLoadStatus extends ActionHandlerEJB implements UpdateLoadStat ...@@ -51,8 +51,11 @@ public class UpdateLoadStatus extends ActionHandlerEJB implements UpdateLoadStat
String[] temp=null; String[] temp=null;
try{ try{
ConnDriver connDriver = new ConnDriver(); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn = connDriver.getConnectDB("DriverITM"); //ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
//changes and commeted by sarita on 01/06/2017 //changes and commeted by sarita on 01/06/2017
//GenericUtility genericUtility = GenericUtility.getInstance(); //GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
......
...@@ -119,8 +119,11 @@ public class User extends ValidatorEJB implements UserLocal,UserRemote ...@@ -119,8 +119,11 @@ public class User extends ValidatorEJB implements UserLocal,UserRemote
try try
{ {
ConnDriver connDriver = new ConnDriver(); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn = connDriver.getConnectDB("DriverITM"); //ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
System.out.println("[UserEJB]connection 1 is opened......"); System.out.println("[UserEJB]connection 1 is opened......");
userId = getValueFromXTRA_PARAMS(xtraParams,"loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams,"loginCode");
...@@ -413,8 +416,11 @@ public class User extends ValidatorEJB implements UserLocal,UserRemote ...@@ -413,8 +416,11 @@ public class User extends ValidatorEJB implements UserLocal,UserRemote
try try
{ {
ConnDriver connDriver = new ConnDriver(); //changes and commented by sarita for DBConnection on 01/06/2017 :START
conn = connDriver.getConnectDB("DriverITM"); //ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017 :END
loginSite = getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode"); loginSite = getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
if(objContext != null && objContext.trim().length()>0) if(objContext != null && objContext.trim().length()>0)
......
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