Commit fbb07081 authored by steurwadkar's avatar steurwadkar

Changed by Manish on 05/07/16 for get connection.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@40531 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 58ed7443
......@@ -171,7 +171,9 @@ public class ItemDetailsBean
* @throws ITMException
*/
//Added by Parikshit Kumbhar on 18/05/2015 [added getSizeDetails() function] Start
public String getSizeDetails( String sizeCode ) throws ITMException
//Changed by Santosh on 16-06-16 to pass connection object
//public String getSizeDetails( String sizeCode ) throws ITMException
public String getSizeDetails( String sizeCode, Connection connection ) throws ITMException
{
E12GenericUtility genericUtility = new E12GenericUtility();
StringBuffer valueXmlString = new StringBuffer("<Root>\r\n");
......@@ -181,9 +183,11 @@ public class ItemDetailsBean
try
{
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Changed and commented by Santosh on 16-06-16 for connection object [Start]
/*ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");*/
conn = connection;
//Changed and commented by Santosh on 16-06-16 for connection object [End]
String sql = "SELECT Attrib_Id, TRIM(Descr),trim(sh_descr) FROM itm_attrib_val WHERE Attrib_Code=? ORDER BY sort_order";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, sizeCode);
......@@ -217,7 +221,8 @@ public class ItemDetailsBean
{
try
{
if (rs != null)
//Commented by Santosh on 16-06-16 [Start]
/*if (rs != null)
{
rs.close();
rs = null;
......@@ -231,7 +236,8 @@ public class ItemDetailsBean
{
conn.close();
conn = null;
}
}*/
//Commented by Santosh on 16-06-16 [End]
}
catch (Exception e)
{
......
......@@ -67,8 +67,12 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe
loginEmpCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginEmpCode");
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverValidator");
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverValidator");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
conn.setAutoCommit(false);
SimpleDateFormat sdf = new SimpleDateFormat( genericUtility.getDBDateTimeFormat());
......@@ -576,8 +580,12 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
loginSite = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginSite");
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
conn.setAutoCommit(false);
//SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateTimeFormat());
......@@ -1560,8 +1568,12 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe
loginSite = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginSiteCode"));
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"chgTerm");
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverValidator");
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverValidator");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
conn.setAutoCommit(false);
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateTimeFormat());
Date sysDate = new Date();
......
......@@ -128,7 +128,8 @@ public class AsnIC extends ValidatorEJB implements AsnICRemote,AsnICLocal
AppConnectParm appConnect = new AppConnectParm();
Properties p = null;
InitialContext ctx = null;
ConnDriver connDriver = null;
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = null;
//changed by sankara on 18/11/13 for black_list supp code
String blackList = "";
......@@ -140,9 +141,14 @@ public class AsnIC extends ValidatorEJB implements AsnICRemote,AsnICLocal
p = appConnect.getProperty();
ctx = new InitialContext(p);
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Commented by Santosh on 14-06-2016
//connDriver = new ConnDriver();
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
//Commented by Santosh on 14-06-2016
//connDriver = null;
userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
//changed by sankara on 07/06/14 for period stat
......@@ -1089,10 +1095,14 @@ public String itemChanged( Document dom, Document dom1, Document dom2, String ob
ITMDBAccessRemote itmDBAccess = (ITMDBAccessRemote)ctx.lookup("ibase/ITMDBAccessEJB/remote");
System.out.println("<!@#> ItemChange for ASn is Called objContext " +objContext);
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverValidator");
//Commented by Santosh on 14-06-2016
/*ConnDriver connDriver = null;
connDriver = new ConnDriver();*/
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverValidator");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
if( objContext != null && objContext.trim().length() > 0 )
{
currentFormNo = Integer.parseInt( objContext );
......
......@@ -118,9 +118,14 @@ public class AsnLotStatIC extends ValidatorEJB implements AsnLotStatICLocal, Asn
try
{
SimpleDateFormat sdft = new SimpleDateFormat( genericUtility.getApplDateFormat() );
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Commented by Santosh on 14-06-2016
/*ConnDriver connDriver = null;
connDriver = new ConnDriver();*/
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
NodeList parentList = null;
NodeList childList = null;
......@@ -499,10 +504,14 @@ public class AsnLotStatIC extends ValidatorEJB implements AsnLotStatICLocal, Asn
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
String userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
columnValue = genericUtility.getColumnValue( currentColumn, dom );
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverValidator");
//Commented by Santosh on 14-06-2016
/*ConnDriver connDriver = null;
connDriver = new ConnDriver();*/
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverValidator");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
if( objContext != null && objContext.trim().length() > 0 )
{
currentFormNo = Integer.parseInt( objContext );
......
......@@ -105,12 +105,17 @@ public class BolVal extends ValidatorEJB implements BolValLocal, BolValRemote
Connection conn = null;
PreparedStatement pstmt = null ;
ResultSet rs = null;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
try
{
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
//Commented by Santosh on 14-06-2016
//connDriver = null;
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
if(objContext != null && objContext.trim().length() > 0)
......@@ -621,13 +626,18 @@ public class BolVal extends ValidatorEJB implements BolValLocal, BolValRemote
PreparedStatement pstmt = null;
ResultSet rs = null ;
E12GenericUtility genericUtility = new E12GenericUtility();
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
try
{
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
conn.setAutoCommit(false);
connDriver = null;
//Commented by Santosh on 14-06-2016
//connDriver = null;
if(objContext != null && objContext.trim().length() > 0)
{
currentFormNo = Integer.parseInt(objContext);
......
......@@ -96,9 +96,13 @@ public class CartonNoGenIC extends ValidatorEJB implements CartonNoGenICLocal, C
{
String columnValue = "";
int currentFormNo = 0;
ConnDriver connDriver = null;
connDriver = new ConnDriver();
connObject = connDriver.getConnectDB("DriverValidator");
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = null;
//connDriver = new ConnDriver();
//Changed and Commented By Santosh on 14-06-2016 :[START]
//connObject = connDriver.getConnectDB("DriverValidator");
connObject = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
NodeList parentList = null;
NodeList childList = null;
......@@ -267,14 +271,19 @@ public class CartonNoGenIC extends ValidatorEJB implements CartonNoGenICLocal, C
String chgTerm = "";
java.util.Date currDate = null;
String currDateStr = null;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
E12GenericUtility genericUtility = new E12GenericUtility();
try
{
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
conn.setAutoCommit(false);
connDriver=null;
//Commented by Santosh on 14-06-2016
//connDriver=null;
String applDateFormat = genericUtility.getApplDateFormat();
currDate = new java.util.Date();
......
......@@ -96,9 +96,12 @@ public class CartonNoGenPrc extends ProcessEJB implements CartonNoGenPrcLocal,Ca
try
{
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
conn.setAutoCommit(false);
if ( windowName == null || windowName.trim().length() == 0 )
......
......@@ -77,14 +77,19 @@ public class CaseTransferIC extends ValidatorEJB implements CaseTransferICLocal,
String ptcn1 = "";
int currentFormNo=0;
int childNodeListLength;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
String columnValue ="";
String palletNo = "";
try
{
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
//Commented by Santosh on 14-06-2016
//connDriver = null;
userId = getValueFromXTRA_PARAMS(xtraParams,"loginCode");
if(objContext != null && objContext.trim().length()>0)
......@@ -426,14 +431,19 @@ public class CaseTransferIC extends ValidatorEJB implements CaseTransferICLocal,
String itemCode = "",lotNo = "", lotSl = "";
java.util.Date currDate = null;
String currDateStr = null;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
E12GenericUtility genericUtility = new E12GenericUtility();
try
{
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
conn.setAutoCommit(false);
connDriver=null;
//Commented by Santosh on 14-06-2016
//connDriver=null;
String applDateFormat = genericUtility.getApplDateFormat();
currDate = new java.util.Date();
......
......@@ -126,8 +126,12 @@ public class CheckSheetIC extends ValidatorEJB implements CheckSheetICLocal,Chec
try
{
int currentFormNo = 0;
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB( "DriverValidator" );
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverValidator");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
String userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
......@@ -657,8 +661,12 @@ public class CheckSheetIC extends ValidatorEJB implements CheckSheetICLocal,Chec
try
{
E12GenericUtility genericUtility = new E12GenericUtility();
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB( "DriverITM" );
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
columnValue = genericUtility.getColumnValue( currentColumn, currFormDataDom );
if( objContext != null && objContext.trim().length() > 0 )
{
......
......@@ -121,8 +121,12 @@ public class CheckSheetPrintIC extends ValidatorEJB implements CheckSheetPrintIC
{
System.out.println("call wf valdata::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::;");
int currentFormNo = 0;
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB( "DriverValidator" );
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverValidator");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
String userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
......
......@@ -47,7 +47,8 @@ public class ConsignmentDetails extends ValidatorEJB implements ConsignmentDetai
ResultSet rs = null;
PreparedStatement pstmt = null;
Connection conn = null;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
String shipment = "", cases = "", weight = "", tasks = "", order = "", week = "", distWeight = "", distCases = "",
consumeWeight = "", consumeCases = "", totalWeight = "", totalCases = "", inputDate = "", date = "";
......@@ -59,8 +60,12 @@ public class ConsignmentDetails extends ValidatorEJB implements ConsignmentDetai
//End by Sneha on 21-07-2015, Request ID: W15ESUN005
try
{
conn = connDriver.getConnectDB(dataSourceName);
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB(dataSourceName);
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
//Commented by Santosh on 14-06-2016
//connDriver = null;
int count = 0;
int noOfDays = 0, dtCount = 0;
Calendar cal = Calendar.getInstance();
......
......@@ -138,9 +138,13 @@ public class ConsolidatToDocPrc extends ProcessEJB implements ConsolidatToDocPrc
try
{
System.out.println("*********inside try block*******");
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
conn.setAutoCommit(false);
ptcn = genericUtility.getColumnValue("ptcn", headerDom);
System.out.println("ptcn ["+ptcn+"]");
......
......@@ -145,10 +145,15 @@ public class ConsolidatePalletIC extends ValidatorEJB implements ConsolidatePall
CommonWmsUtil commonWmsUtility = CommonWmsUtil.getInstance();
System.out.println("xtraParam----->>["+xtraParams+"]");
loginSite = checkNull(genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginSiteCode" ));
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
conn.setAutoCommit(false);
connDriver = null;
//Commented by Santosh on 14-06-2016
//connDriver = null;
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
if (objContext != null && objContext.trim().length() > 0)
......@@ -609,9 +614,13 @@ public class ConsolidatePalletIC extends ValidatorEJB implements ConsolidatePall
Calendar currentDate = Calendar.getInstance();
SimpleDateFormat simpleDateFormatObj = new SimpleDateFormat(genericUtility.getApplDateFormat());
tranDate = simpleDateFormatObj.format(currentDate.getTime());
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB( "DriverITM" );
connDriver = null;
//ConnDriver connDriver = new ConnDriver();
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
if( objContext != null && objContext.trim().length() > 0 )
{
......
......@@ -76,7 +76,8 @@ public class DDPordWizAmdEJB extends ValidatorEJB implements DDPordWizAmdEJBRemo
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
Connection conn = null;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
ResultSet rs = null;
PreparedStatement pstmt = null ;
......@@ -102,7 +103,10 @@ public class DDPordWizAmdEJB extends ValidatorEJB implements DDPordWizAmdEJBRemo
try
{
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
if(objContext != null && objContext.trim().length() > 0)
......@@ -449,7 +453,8 @@ public class DDPordWizAmdEJB extends ValidatorEJB implements DDPordWizAmdEJBRemo
{
try
{
connDriver = null;
//Commented by Santosh on 14-06-2016
//connDriver = null;
if(rs != null)
{
rs.close();
......@@ -542,12 +547,15 @@ public class DDPordWizAmdEJB extends ValidatorEJB implements DDPordWizAmdEJBRemo
ResultSet rs2 = null;
PreparedStatement pstmt2 = null ;
Connection conn = null;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
try
{
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
if(objContext != null && objContext.trim().length() > 0)
{
......@@ -859,8 +867,11 @@ public class DDPordWizAmdEJB extends ValidatorEJB implements DDPordWizAmdEJBRemo
try
{
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
if (field.equals("supp_code"))
{
......
......@@ -40,12 +40,16 @@ public class DDPorderReportSendMail extends ActionHandlerEJB implements DDPorder
System.out.println("--------------ActionHandler method of Send Mail for PO ------------- : ["+tranId+"]");
String retString = "";
Connection conn = null;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
try
{
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
//connDriver = null;
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
retString = sendReport(tranId,xtraParams,forcedFlag,conn);
}
catch(Exception e)
......
......@@ -440,7 +440,8 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
{
String errString="";
Connection conn = null;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
int currentFormNo = 0;
StringBuffer valueXmlString = new StringBuffer();
String userId = "";
......@@ -456,7 +457,10 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
try
{
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
if(objContext != null && objContext.trim().length() > 0)
{
......@@ -807,7 +811,8 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
{
try
{
connDriver = null;
//Commented by Santosh on 14-06-2016
//connDriver = null;
if(pstmt != null)
......@@ -861,8 +866,11 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
{
DateFormat dateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
if (field.equals("tran_code"))
{
......@@ -1844,8 +1852,11 @@ public class DDPorderWizEJB extends ValidatorEJB implements DDPorderWizEJBRemote
details.append("<finish>");
try
{
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
sql = "SELECT PURC_ORDER,REMARKS,SUPP_CODE,TAX_AMT FROM PORDER WHERE UDF_STR__2 = ?";
pstmt = conn.prepareStatement(sql);
......
......@@ -40,13 +40,18 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
{
String retString = "";
Connection conn = null;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
boolean isConn= true;
try
{
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
conn.setAutoCommit(false);
connDriver = null;
//Commented by Santosh on 14-06-2016
//connDriver = null;
retString = this.confirm( tranID,xtraParams, forcedFlag ,conn ,isConn);
......@@ -681,7 +686,10 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
//errString = conToDoc.process(tempPTCN, conn,xtraParams);
// Changed by Manish on 08/06/16 [start]
errString = conToDoc.process(tempPTCN, null,xtraParams);
//Changed by Santosh on 16-06-16 to pass connection object[START]
//errString = conToDoc.process(tempPTCN, null,xtraParams);
errString = conToDoc.process(tempPTCN, conn,xtraParams);
//Changed by Santosh on 16-06-16 to pass connection object[END]
// Changed by Manish on 08/06/16 [end]
if ( errString != null && errString.trim().length() > 0 )
{
......
......@@ -130,9 +130,12 @@ public class DeallocArtIC extends ValidatorEJB implements DeallocArtICRemote, De
int currentFormNo = 0, cnt = 0, count = 0;
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = null;
//connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
NodeList parentList = null;
NodeList childList = null;
......@@ -719,10 +722,15 @@ public class DeallocArtIC extends ValidatorEJB implements DeallocArtICRemote, De
String dbDateFormat = genericUtility.getDBDateFormat();
String applDateFormat = genericUtility.getApplDateFormat();
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = null;
//connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
projectName = distCommon.getDisparams("999999","PROJECT",conn); //Added By Manish on 02/03/16 for DDUK
if( objContext != null && objContext.trim().length() > 0 )
......
......@@ -144,10 +144,15 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
try
{
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getDBDateFormat());
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
projectName = discommon.getDisparams("999999","PROJECT",conn); //Added By Manish on 02/03/16 for DDUK
//siteCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "site_code");
/*ptcn = genericUtility.getColumnValue("ptcn",headerDom);
......@@ -700,10 +705,13 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
System.out.println(" chgUser ["+chgUser+"] chgTerm["+chgTerm+"] siteCode["+siteCode+"]");
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
conn.setAutoCommit(false);
connDriver = null;
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
/*sql = " SELECT DISTINCT WTD.WAVE_ID FROM CARTON_MASTER CM, PICK_ORD_DET POD , PICK_ORD_HDR POH, WAVE_TASK_DET WTD " +
" WHERE CM.PTCN = ? AND CM.PICK_ORDER = POD.PICK_ORDER AND POH.PICK_ORDER = POD.PICK_ORDER " +
......
......@@ -113,10 +113,15 @@ public class DespEditPrc extends ProcessEJB implements DespEditPrcLocal,DespEdit
try
{
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getDBDateFormat());
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
siteCode = genericUtility.getColumnValue("site_code",headerDom);
if ( siteCode == null || siteCode.trim().length() == 0 )
......
......@@ -122,8 +122,11 @@ etc
String applDateFmt = genericUtility.getApplDateFormat();
String dbDateFmt = genericUtility.getDBDateFormat();
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
siteCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginSiteCode");
System.out.println("site code ->["+siteCode+"]");
......@@ -380,10 +383,13 @@ etc
Set errSet = null;
try
{
int currentFormNo = 0;
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB( "DriverITM" );
connDriver = null;
int currentFormNo = 0;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB( "DriverITM" );
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
String userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
......
......@@ -106,9 +106,12 @@ public class DespPackIC extends ValidatorEJB implements DespPackICRemote, DespPa
try
{
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverValidator");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = null;
//connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverValidator");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
if(objContext != null && objContext.trim().length()>0)
{
......@@ -328,10 +331,12 @@ etc
try
{
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("Driver");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = null;
//connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("Driver");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
if( objContext != null && objContext.trim().length() > 0 )
{
......
......@@ -112,9 +112,12 @@ public class DespatchAmendIC extends ValidatorEJB implements DespatchAmendICRemo
try
{
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverValidator");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = null;
//connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverValidator");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
if(objContext != null && objContext.trim().length()>0)
{
......@@ -296,9 +299,13 @@ public class DespatchAmendIC extends ValidatorEJB implements DespatchAmendICRemo
despId = checkNull( genericUtility.getColumnValue("desp_id", hdrDom));
System.out.println("desp id-->["+despId+"]");
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverValidator");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = null;
//connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverValidator");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
if( objContext != null && objContext.trim().length() > 0 )
{
currentFormNo = Integer.parseInt( objContext );
......
......@@ -68,10 +68,13 @@ public class DespatchConfWiz extends ValidatorEJB implements DespatchConfWizLoca
{
E12GenericUtility genericUtility = new E12GenericUtility();
ConnDriver connDriver = new ConnDriver();
conn1 = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn1 = connDriver.getConnectDB("DriverITM");
conn1 = getConnection();
conn1.setAutoCommit(false);
connDriver = null;
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
Document dom = null;
dom = genericUtility.parseString(domString);
......
......@@ -105,11 +105,13 @@ public class DespatchConfWizIC extends ValidatorEJB implements DespatchConfWizIC
System.out.println("DOM1----->>["+genericUtility.serializeDom(dom1).toString()+"]");
System.out.println("DOM2----->>["+genericUtility.serializeDom(dom2).toString()+"]");
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
conn.setAutoCommit(false);
connDriver = null;
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
if (objContext != null && objContext.trim().length() > 0)
{
currentFormNo = Integer.parseInt(objContext);
......@@ -230,14 +232,17 @@ public class DespatchConfWizIC extends ValidatorEJB implements DespatchConfWizIC
StringBuffer valueXmlString = new StringBuffer();
Connection conn = null;
int currentFormNo = 0;
ConnDriver connDriver = new ConnDriver();
//ConnDriver connDriver = new ConnDriver();
try
{
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
conn.setAutoCommit(false);
connDriver=null;
//connDriver=null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
if(objContext != null && objContext.trim().length()>0)
{
......
......@@ -112,9 +112,12 @@ public class DespatchIC extends ValidatorEJB implements DespatchICRemote, Despat
try
{
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverValidator");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = null;
//connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverValidator");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
if(objContext != null && objContext.trim().length()>0)
{
......@@ -294,9 +297,14 @@ public class DespatchIC extends ValidatorEJB implements DespatchICRemote, Despat
despId = checkNull( genericUtility.getColumnValue("desp_id", hdrDom));
System.out.println("desp id-->["+despId+"]");
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverValidator");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = null;
//connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverValidator");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
if( objContext != null && objContext.trim().length() > 0 )
{
currentFormNo = Integer.parseInt( objContext );
......
......@@ -926,10 +926,13 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
}
Connection tempConn = null;
ConnDriver connDriver = null;
connDriver = new ConnDriver();
tempConn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = null;
//connDriver = new ConnDriver();
//tempConn = connDriver.getConnectDB("DriverITM");
tempConn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
System.out.println("next to update exchrate=======");
sql = " UPDATE DESPATCH SET EXCH_RATE = " + exchRate + ", EXCH_RATE__FRT = " + exchRate + ", EXCH_RATE__INS = " + exchRate + " WHERE DESP_ID = ? ";
pstmt = tempConn.prepareStatement(sql);
......@@ -1505,16 +1508,20 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
StringBuffer payPalInfo = new StringBuffer();
HashMap <String,String> payPalDetailMap = new HashMap <String,String>();
//Connection conn = null;
ConnDriver connDriver = null;
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = null;
boolean isCommit = false;
boolean lockSuccess = false;
try
{
if(conn == null)
{
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
isCommit = true;
}
// 16-apr-16 manoharan check for tran_id__rcp also
......@@ -1724,7 +1731,8 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
double exchRate = 0,chqAmt = 0;
int count = 0;
double initialValue=0.0;
ConnDriver connDriver = null;
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = null;
Connection conn = null;
boolean isError = false;
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
......@@ -1737,9 +1745,12 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
Properties p = appConnect.getProperty();
InitialContext ctx = new InitialContext(p);
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
refNo = (String)insertMap.get("ref_no");
siteCode = (String)insertMap.get("site_code");
......@@ -3588,16 +3599,20 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
StringBuffer payPalInfo = new StringBuffer();
HashMap <String,String> payPalDetailMap = new HashMap <String,String>();
//Connection conn = null;
ConnDriver connDriver = null;
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = null;
try
{
// Changed by Sneha on 12-03-2016, [Start]
if(isCommit)
{
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
}
// Changed by Sneha on 12-03-2016, [End]
......@@ -3862,15 +3877,19 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
StringBuffer sagePayInfo = new StringBuffer();
HashMap <String,String> sagePayDetailMap = new HashMap <String,String>();
//Connection conn = null;
ConnDriver connDriver = null;
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = null;
try
{
// Changed by Sneha on 12-03-2016, [Start]
if(isCommit)
{
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
}
// Changed by Sneha on 12-03-2016, [End]
......
......@@ -500,7 +500,8 @@ public class ExpStkTransferPos extends ValidatorEJB implements ExpStkTransferPos
Statement stmt = null;
ResultSet rs = null;
String sql = "", stkOption = "";
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
try
{
//conn = connDriver.getConnectDB("DriverITM"); //commented by Dadaso pawar on 09/04/15
......
......@@ -221,11 +221,14 @@ public class ExpStockTransferIC extends ValidatorEJB implements ExpStockTransfer
try
{
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = null;
//connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//changed by sankara on 07/jun/14 for period stat
SimpleDateFormat sdf1 = new SimpleDateFormat(genericUtility.getApplDateFormat());
userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
......@@ -1496,9 +1499,12 @@ public class ExpStockTransferIC extends ValidatorEJB implements ExpStockTransfer
String dbDateFormat = genericUtility.getDBDateFormat();
String applDateFormat = genericUtility.getApplDateFormat();
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = null;
//connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
DistCommon distCommon = new DistCommon();
......
......@@ -80,8 +80,12 @@ public class FrightUpdIC extends ValidatorEJB implements FrightUpdICRemote, Frig
try
{
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
siteCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginSiteCode");
System.out.println("site code ->["+siteCode+"]");
System.out.println("Current Column> > > > ->["+currentColumn+"]");
......
......@@ -102,9 +102,12 @@ public class FrightUpdPrc extends ProcessEJB implements FrightUpdPrcLocal,Fright
try
{
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId");
......@@ -312,13 +315,16 @@ public class FrightUpdPrc extends ProcessEJB implements FrightUpdPrcLocal,Fright
String userInfo = getUserInfo(xtraParams);
masterStatefulLocal.setUserInfo(userInfo, "");
//Changed By samadhan on 21/07/2015 for get xml in edit mode & update frt amt using previous component End
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId");
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
conn.setAutoCommit(false);
connDriver = null;
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
parentNodeList = headerDom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0);
......
......@@ -85,7 +85,8 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
Connection conn = null;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
ResultSet rs = null;
PreparedStatement pstmt = null;
......@@ -108,7 +109,10 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
ArrayList<String> errFields = new ArrayList<String>();
try{
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
if (objContext != null && objContext.trim().length() > 0){
......@@ -217,7 +221,8 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
} finally{
try{
connDriver = null;
//Commented by Santosh on 14-06-2016
//connDriver = null;
if (rs != null) {
rs.close();
rs = null;
......@@ -296,10 +301,14 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
PreparedStatement pstmt = null;
Connection conn = null;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
try {
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
System.out.println("Obj Context = "+objContext);
......
......@@ -124,8 +124,11 @@ etc
String applDateFmt = genericUtility.getApplDateFormat();
String dbDateFmt = genericUtility.getDBDateFormat();
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
siteCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginSiteCode");
System.out.println("site code ->["+siteCode+"]");
......@@ -397,10 +400,13 @@ etc
try
{
int currentFormNo = 0;
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB( "DriverITM" );
connDriver = null;
int currentFormNo = 0;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB( "DriverITM" );
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
boolean packFlag=true;
boolean tranFlag=true;
String userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
......
......@@ -187,9 +187,12 @@ public class GeneShipLabelsPrc extends ProcessEJB implements GeneShipLabelsPrcLo
try
{
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
/*chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId");*/
......
......@@ -125,8 +125,12 @@ etc
String applDateFmt = genericUtility.getApplDateFormat();
String dbDateFmt = genericUtility.getDBDateFormat();
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
siteCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginSiteCode");
System.out.println("site code ->["+siteCode+"]");
......@@ -356,10 +360,13 @@ etc
try
{
int currentFormNo = 0;
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB( "DriverITM" );
connDriver = null;
int currentFormNo = 0;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB( "DriverITM" );
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
String userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
......
......@@ -164,11 +164,13 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo
try
{
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
conn.setAutoCommit(false);
connDriver = null;
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
ptcn = checkNull(genericUtility.getColumnValue("ptcn",headerDom));
glblPTCN = ptcn;
waveId = checkNull(genericUtility.getColumnValue("wave_id",headerDom));
......
......@@ -76,11 +76,15 @@ public class HoldRelAct extends ActionHandlerEJB implements HoldRelActLocal, Hol
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
E12GenericUtility genericUtility = new E12GenericUtility();
try
{
conn = connDriver.getConnectDB("DriverITM");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
sqlAppend = "tran_id, "
+ "line_no, "
......
......@@ -106,7 +106,8 @@ public class InvFreezeIC extends ValidatorEJB implements InvFreezeICLocal, InvFr
String userId = "";
int currentFormNo=0;
int childNodeListLength;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
String locCodeFrom = "";
String locCodeTO = "";
String itemSerFrom = "";
......@@ -116,8 +117,11 @@ public class InvFreezeIC extends ValidatorEJB implements InvFreezeICLocal, InvFr
try
{
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
userId = getValueFromXTRA_PARAMS(xtraParams,"loginCode");
if(objContext != null && objContext.trim().length()>0)
......@@ -562,13 +566,15 @@ public class InvFreezeIC extends ValidatorEJB implements InvFreezeICLocal, InvFr
String locCodeFrom = "", locCodeTo = "", itemCode = "",locCode = "", lotNo = "", lotSl = "", quantity = "", unit = "";
java.sql.Timestamp effDate = null;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
try
{
conn = connDriver.getConnectDB("DriverITM");
{ //Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
conn.setAutoCommit(false);
connDriver=null;
//connDriver=null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
if(objContext != null && objContext.trim().length()>0)
{
......
......@@ -115,9 +115,12 @@ public class InvLockIC extends ValidatorEJB implements InvLockICRemote, InvLockI
try
{
ConnDriver connDriver = null;
connDriver = new ConnDriver();
connectionObject = connDriver.getConnectDB("DriverValidator");
//Changed and Commented By Santosh on 14-06-2016 :[START]
//ConnDriver connDriver = null;
//connDriver = new ConnDriver();
//connectionObject = connDriver.getConnectDB("DriverValidator");
connectionObject = getConnection();
//Changed and Commented By Santosh on 14-06-2016 :[END]
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
if(objContext != null && objContext.trim().length()>0)
{
......
......@@ -40,12 +40,16 @@ public class InventoryOccupancy extends ValidatorEJB implements InventoryOccupan
ResultSet rs = null;
PreparedStatement pstmt = null;
Connection conn = null;
ConnDriver connDriver = new ConnDriver();
//Commented by Santosh on 14-06-2016
//ConnDriver connDriver = new ConnDriver();
try
{
conn = connDriver.getConnectDB(dataSourceName);
connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[START]
//conn = connDriver.getConnectDB(dataSourceName);
conn = getConnection();
//connDriver = null;
//Changed and Commented By Santosh on 14-06-2016 :[END]
int count = 0, total = 0, used = 0;
double percentage = 0, totalDso = 0, usedDso = 0, percentageDso = 0,
totalPso = 0, usedPso = 0, percentagePso = 0, totalCaspk = 0, usedCaspk = 0, percentageCaspk = 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