Commit 757f836e authored by prane's avatar prane

changes done creating instance of the class using new keyword instead of lookup of EJB

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@187911 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c04107a1
......@@ -3254,20 +3254,7 @@ public class DistIssueAct extends ActionHandlerEJB implements DistIssueActLocal,
/*
returnValue = serializeDom(dom);
System.out.println("returnValue from serializeDom[line_no_dist_order] :"+returnValue);
AppConnectParm appConnect = new AppConnectParm();
Properties props = appConnect.getProperty();
InitialContext ctx = new InitialContext(props);
System.out.println("Looking Up for DBAccess EJB with Properties ==>\n"+props);
//DistIssueHome distIssueHome = (DistIssueHome)ctx.lookup("DistIssue");
//DistIssue distIssueRemote = distIssueHome.create();
ValidatorHome distIssueHome = (ValidatorHome)ctx.lookup("DistIssue");
Validator distIssueRemote = distIssueHome.create();
System.out.println("DBAccessEJB Created");
itemChngXmlString = distIssueRemote.itemChanged(returnValue, xmlString1, "", objContext, "line_no_dist_order", "E", xtraParams);
*/
itemChngXmlString = itemChngXmlStrBuff.toString();
......
......@@ -4,7 +4,6 @@ import ibase.system.config.ConnDriver;
import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ITMDBAccessLocal;
import ibase.webitm.ejb.MasterStatefulLocal;
import ibase.webitm.ejb.dis.POrderMilestone;
import ibase.webitm.ejb.dis.adv.CreatePoVoucherAdvance;
......@@ -961,7 +960,7 @@ public class POMilestoneCnf
String sql="";
int cnt = 0,count=0,detailsCnt =0,shipmentleadTime=0,lineNo=0,minDays=0,maxDays=0;
//ConnDriver connDriver = new ConnDriver();
ITMDBAccessLocal itmDBAccessLocal = new ITMDBAccessEJB();
//ITMDBAccessLocal itmDBAccessLocal = new ITMDBAccessEJB();
// long diff=0,datediff=0;
double finChrge=0.0,minAmt=0.0,maxAmt=0.0,amtDet=0.0,taxAmtDet=0.0,amount=0.0,pentlyAmt=0.0;
double exchRate = 0.0,billAmt=0.0,taxAmt=0.0,totAmt=0.0,netAMt=0.0;
......@@ -1146,7 +1145,7 @@ public class POMilestoneCnf
Date dispatchDate=null,processDate1=null,dueDate1=null;
int cnt = 0,count=0,detailsCnt =0,shipmentleadTime=0,lineNo=0,minDays=0,maxDays=0;
//ConnDriver connDriver = new ConnDriver();
ITMDBAccessLocal itmDBAccessLocal = new ITMDBAccessEJB();
ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
long diff=0,datediff=0;
double finChrge=0.0,minAmt=0.0,maxAmt=0.0,amtDet=0.0,taxAmtDet=0.0,amount=0.0,pentlyAmt=0.0;
double exchRate = 0.0,billAmt=0.0,taxAmt=0.0,totAmt=0.0,netAMt=0.0;
......@@ -2157,7 +2156,7 @@ public class POMilestoneCnf
*/
}else
{
errString = itmDBAccessLocal.getErrorString("", "VTTRINERR", "");
errString = itmDBAccessLocal.getErrorString("", "VTTRINERR", "","",conn);
}
} catch (Exception e)
......@@ -2165,7 +2164,7 @@ public class POMilestoneCnf
e.printStackTrace();
System.out.println("Exception ::" + e.getMessage());
errString = itmDBAccessLocal.getErrorString("", "VTTRINERR", "");
errString = itmDBAccessLocal.getErrorString("", "VTTRINERR", "","",conn);
return errString;
}
......
......@@ -12,7 +12,6 @@ import java.text.SimpleDateFormat;
import java.util.Calendar;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ITMDBAccessLocal;
import ibase.utility.E12GenericUtility;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*;
......@@ -45,11 +44,10 @@ public class RecalFrtAct extends ActionHandlerEJB implements RecalFrtActLocal, R
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
ITMDBAccessEJB itmDBAccessEJB = null;
ITMDBAccessEJB itmDBAccessLocal = null;
System.out.println("tran id = "+tranId);
Timestamp sysdate = null;
String confirmed="";
ITMDBAccessLocal itmDBAccessLocal = new ITMDBAccessEJB();
ConnDriver connDriver = new ConnDriver();
......@@ -63,7 +61,7 @@ public class RecalFrtAct extends ActionHandlerEJB implements RecalFrtActLocal, R
String userID = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "LoginCode" );
System.out.println(" userID ["+userID+"]");
itmDBAccessEJB = new ITMDBAccessEJB();
itmDBAccessLocal = new ITMDBAccessEJB();
connDriver = new ConnDriver();
connDriver = null;
conn.setAutoCommit(false);
......@@ -86,7 +84,7 @@ public class RecalFrtAct extends ActionHandlerEJB implements RecalFrtActLocal, R
if( "Y".equalsIgnoreCase(confirmed))
{
errString = itmDBAccessLocal.getErrorString("","VTDIST26","");
errString = itmDBAccessLocal.getErrorString("","VTDIST26","","",conn);
return errString;
}
else
......@@ -97,13 +95,13 @@ public class RecalFrtAct extends ActionHandlerEJB implements RecalFrtActLocal, R
{
conn.rollback();
System.out.println("@@@@@@@@@ recalculate failed...........");
errString = itmDBAccessLocal.getErrorString("",errCode,"");
errString = itmDBAccessLocal.getErrorString("",errCode,"","",conn);
}
else
{
conn.commit();
System.out.println("@@@@@@@@@ recalculate successfully...........");
errString = itmDBAccessLocal.getErrorString("","VMRECALSUC","");
errString = itmDBAccessLocal.getErrorString("","VMRECALSUC","","",conn);
}
}
}
......@@ -167,7 +165,6 @@ public class RecalFrtAct extends ActionHandlerEJB implements RecalFrtActLocal, R
String retString = "", sql = "", sql1 = "",errCode = "";
Timestamp sysDate = null;
ibase.utility.E12GenericUtility genericUtility= new ibase.utility.E12GenericUtility();
ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
int sequence=0;
double frtAmt=0;
......
......@@ -13,7 +13,6 @@ import ibase.utility.CommonConstants;
import ibase.webitm.ejb.ActionHandlerEJB;
import ibase.webitm.ejb.E12CreateBatchLoadEjb;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ITMDBAccessLocal;
import ibase.webitm.ejb.MasterStatefulLocal;
import ibase.webitm.ejb.sys.CreateRCPXML;
import ibase.utility.E12GenericUtility;
......@@ -72,7 +71,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
String userID = genericUtility.getValueFromXTRA_PARAMS( xtraParam, "LoginCode" );
System.out.println(" forced flag ["+forcedFlag+"]");
ITMDBAccessLocal itmDBAccessLocal = new ITMDBAccessEJB();
ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
// check whether already confirmed or not
......@@ -92,7 +91,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
if( "Y".equalsIgnoreCase(confirmed))
{
errString = itmDBAccessLocal.getErrorString("","VTDIST26","");
errString = itmDBAccessLocal.getErrorString("","VTDIST26","","",conn);
return errString;
}
else
......@@ -105,7 +104,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
{
conn.rollback();
System.out.println("@@@@@@@@@ rollback successful...........");
errString = itmDBAccessLocal.getErrorString("",errCode,"");
errString = itmDBAccessLocal.getErrorString("",errCode,"","",conn);
System.out.println("@@@@@@@@@ confirm failed.....");
}
else
......@@ -113,7 +112,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
conn.commit();
// retString=generateTrackInfo(tranId,conn); // comment this method by mahendra
System.out.println("@@@@@@@@@ commit successful...........");
errString = itmDBAccessLocal.getErrorString("","VTCONFIRM","");
errString = itmDBAccessLocal.getErrorString("","VTCONFIRM","","",conn);
System.out.println("@@@@@@@@@ confirm successful...........");
}
}
......@@ -158,7 +157,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
String sql = "", sql1 = "", errCode = "";
Timestamp sysDate = null, lrDate=null,lrDateUpd=null;
ibase.utility.E12GenericUtility genericUtility= new ibase.utility.E12GenericUtility();
ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
//ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
int cntDist=0,cntConsIss=0;
String confirmed="",lrNo="",lorryNo="",recallFrt="",despId="",lrNoUpd="",lorryNoUpd="",distOrdIssId="",conOrdIssId="";
double totalFreight=0,gwtDesp=0,gwtDist=0,totGwt=0,grossWeight=0,calcFrt=0,totFrt=0,frtAmt=0,grossWeightCIss=0;
......@@ -678,7 +677,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
HashMap<String,String> tempMap = new HashMap<String,String>();
ArrayList tempList = null;
ConnDriver connDriver = new ConnDriver();
ITMDBAccessLocal itmDBAccessLocal = new ITMDBAccessEJB();
ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
try
{
......@@ -738,7 +737,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
else
{
System.out.println("Shipment Id not found in despatch table");
errString = itmDBAccessLocal.getErrorString("","VTSHIDEXST","");
errString = itmDBAccessLocal.getErrorString("","VTSHIDEXST","","",conn);
return errString;
}
......@@ -861,7 +860,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
if(despatchId == null)
{
System.out.println("despatchId found null in ship_docs");
errString = itmDBAccessLocal.getErrorString("","VTDSIDEXST","");
errString = itmDBAccessLocal.getErrorString("","VTDSIDEXST","","",conn);
return errString;
}
......@@ -1209,7 +1208,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
System.out.println("failed!!!!");
conn.rollback();
errString = itmDBAccessLocal.getErrorString("","VTGTRTIFLD","");
errString = itmDBAccessLocal.getErrorString("","VTGTRTIFLD","","",conn);
return errString;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment