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, ...@@ -3254,20 +3254,7 @@ public class DistIssueAct extends ActionHandlerEJB implements DistIssueActLocal,
/* /*
returnValue = serializeDom(dom); returnValue = serializeDom(dom);
System.out.println("returnValue from serializeDom[line_no_dist_order] :"+returnValue); 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"); System.out.println("DBAccessEJB Created");
itemChngXmlString = distIssueRemote.itemChanged(returnValue, xmlString1, "", objContext, "line_no_dist_order", "E", xtraParams); itemChngXmlString = distIssueRemote.itemChanged(returnValue, xmlString1, "", objContext, "line_no_dist_order", "E", xtraParams);
*/ */
itemChngXmlString = itemChngXmlStrBuff.toString(); itemChngXmlString = itemChngXmlStrBuff.toString();
......
...@@ -4,7 +4,6 @@ import ibase.system.config.ConnDriver; ...@@ -4,7 +4,6 @@ import ibase.system.config.ConnDriver;
import ibase.utility.CommonConstants; import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility; import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB; import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ITMDBAccessLocal;
import ibase.webitm.ejb.MasterStatefulLocal; import ibase.webitm.ejb.MasterStatefulLocal;
import ibase.webitm.ejb.dis.POrderMilestone; import ibase.webitm.ejb.dis.POrderMilestone;
import ibase.webitm.ejb.dis.adv.CreatePoVoucherAdvance; import ibase.webitm.ejb.dis.adv.CreatePoVoucherAdvance;
...@@ -961,7 +960,7 @@ public class POMilestoneCnf ...@@ -961,7 +960,7 @@ public class POMilestoneCnf
String sql=""; String sql="";
int cnt = 0,count=0,detailsCnt =0,shipmentleadTime=0,lineNo=0,minDays=0,maxDays=0; int cnt = 0,count=0,detailsCnt =0,shipmentleadTime=0,lineNo=0,minDays=0,maxDays=0;
//ConnDriver connDriver = new ConnDriver(); //ConnDriver connDriver = new ConnDriver();
ITMDBAccessLocal itmDBAccessLocal = new ITMDBAccessEJB(); //ITMDBAccessLocal itmDBAccessLocal = new ITMDBAccessEJB();
// long diff=0,datediff=0; // 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 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; double exchRate = 0.0,billAmt=0.0,taxAmt=0.0,totAmt=0.0,netAMt=0.0;
...@@ -1146,7 +1145,7 @@ public class POMilestoneCnf ...@@ -1146,7 +1145,7 @@ public class POMilestoneCnf
Date dispatchDate=null,processDate1=null,dueDate1=null; Date dispatchDate=null,processDate1=null,dueDate1=null;
int cnt = 0,count=0,detailsCnt =0,shipmentleadTime=0,lineNo=0,minDays=0,maxDays=0; int cnt = 0,count=0,detailsCnt =0,shipmentleadTime=0,lineNo=0,minDays=0,maxDays=0;
//ConnDriver connDriver = new ConnDriver(); //ConnDriver connDriver = new ConnDriver();
ITMDBAccessLocal itmDBAccessLocal = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
long diff=0,datediff=0; 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 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; double exchRate = 0.0,billAmt=0.0,taxAmt=0.0,totAmt=0.0,netAMt=0.0;
...@@ -2157,7 +2156,7 @@ public class POMilestoneCnf ...@@ -2157,7 +2156,7 @@ public class POMilestoneCnf
*/ */
}else }else
{ {
errString = itmDBAccessLocal.getErrorString("", "VTTRINERR", ""); errString = itmDBAccessLocal.getErrorString("", "VTTRINERR", "","",conn);
} }
} catch (Exception e) } catch (Exception e)
...@@ -2165,7 +2164,7 @@ public class POMilestoneCnf ...@@ -2165,7 +2164,7 @@ public class POMilestoneCnf
e.printStackTrace(); e.printStackTrace();
System.out.println("Exception ::" + e.getMessage()); System.out.println("Exception ::" + e.getMessage());
errString = itmDBAccessLocal.getErrorString("", "VTTRINERR", ""); errString = itmDBAccessLocal.getErrorString("", "VTTRINERR", "","",conn);
return errString; return errString;
} }
......
...@@ -12,7 +12,6 @@ import java.text.SimpleDateFormat; ...@@ -12,7 +12,6 @@ import java.text.SimpleDateFormat;
import java.util.Calendar; import java.util.Calendar;
import ibase.webitm.ejb.ITMDBAccessEJB; import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ITMDBAccessLocal;
import ibase.utility.E12GenericUtility; import ibase.utility.E12GenericUtility;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*; import ibase.webitm.ejb.*;
...@@ -45,11 +44,10 @@ public class RecalFrtAct extends ActionHandlerEJB implements RecalFrtActLocal, R ...@@ -45,11 +44,10 @@ public class RecalFrtAct extends ActionHandlerEJB implements RecalFrtActLocal, R
Connection conn = null; Connection conn = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
ITMDBAccessEJB itmDBAccessEJB = null; ITMDBAccessEJB itmDBAccessLocal = null;
System.out.println("tran id = "+tranId); System.out.println("tran id = "+tranId);
Timestamp sysdate = null; Timestamp sysdate = null;
String confirmed=""; String confirmed="";
ITMDBAccessLocal itmDBAccessLocal = new ITMDBAccessEJB();
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
...@@ -63,7 +61,7 @@ public class RecalFrtAct extends ActionHandlerEJB implements RecalFrtActLocal, R ...@@ -63,7 +61,7 @@ public class RecalFrtAct extends ActionHandlerEJB implements RecalFrtActLocal, R
String userID = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "LoginCode" ); String userID = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "LoginCode" );
System.out.println(" userID ["+userID+"]"); System.out.println(" userID ["+userID+"]");
itmDBAccessEJB = new ITMDBAccessEJB(); itmDBAccessLocal = new ITMDBAccessEJB();
connDriver = new ConnDriver(); connDriver = new ConnDriver();
connDriver = null; connDriver = null;
conn.setAutoCommit(false); conn.setAutoCommit(false);
...@@ -86,7 +84,7 @@ public class RecalFrtAct extends ActionHandlerEJB implements RecalFrtActLocal, R ...@@ -86,7 +84,7 @@ public class RecalFrtAct extends ActionHandlerEJB implements RecalFrtActLocal, R
if( "Y".equalsIgnoreCase(confirmed)) if( "Y".equalsIgnoreCase(confirmed))
{ {
errString = itmDBAccessLocal.getErrorString("","VTDIST26",""); errString = itmDBAccessLocal.getErrorString("","VTDIST26","","",conn);
return errString; return errString;
} }
else else
...@@ -97,13 +95,13 @@ public class RecalFrtAct extends ActionHandlerEJB implements RecalFrtActLocal, R ...@@ -97,13 +95,13 @@ public class RecalFrtAct extends ActionHandlerEJB implements RecalFrtActLocal, R
{ {
conn.rollback(); conn.rollback();
System.out.println("@@@@@@@@@ recalculate failed..........."); System.out.println("@@@@@@@@@ recalculate failed...........");
errString = itmDBAccessLocal.getErrorString("",errCode,""); errString = itmDBAccessLocal.getErrorString("",errCode,"","",conn);
} }
else else
{ {
conn.commit(); conn.commit();
System.out.println("@@@@@@@@@ recalculate successfully..........."); 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 ...@@ -167,7 +165,6 @@ public class RecalFrtAct extends ActionHandlerEJB implements RecalFrtActLocal, R
String retString = "", sql = "", sql1 = "",errCode = ""; String retString = "", sql = "", sql1 = "",errCode = "";
Timestamp sysDate = null; Timestamp sysDate = null;
ibase.utility.E12GenericUtility genericUtility= new ibase.utility.E12GenericUtility(); ibase.utility.E12GenericUtility genericUtility= new ibase.utility.E12GenericUtility();
ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
int sequence=0; int sequence=0;
double frtAmt=0; double frtAmt=0;
......
...@@ -13,7 +13,6 @@ import ibase.utility.CommonConstants; ...@@ -13,7 +13,6 @@ import ibase.utility.CommonConstants;
import ibase.webitm.ejb.ActionHandlerEJB; import ibase.webitm.ejb.ActionHandlerEJB;
import ibase.webitm.ejb.E12CreateBatchLoadEjb; import ibase.webitm.ejb.E12CreateBatchLoadEjb;
import ibase.webitm.ejb.ITMDBAccessEJB; import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ITMDBAccessLocal;
import ibase.webitm.ejb.MasterStatefulLocal; import ibase.webitm.ejb.MasterStatefulLocal;
import ibase.webitm.ejb.sys.CreateRCPXML; import ibase.webitm.ejb.sys.CreateRCPXML;
import ibase.utility.E12GenericUtility; import ibase.utility.E12GenericUtility;
...@@ -72,7 +71,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf ...@@ -72,7 +71,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
String userID = genericUtility.getValueFromXTRA_PARAMS( xtraParam, "LoginCode" ); String userID = genericUtility.getValueFromXTRA_PARAMS( xtraParam, "LoginCode" );
System.out.println(" forced flag ["+forcedFlag+"]"); System.out.println(" forced flag ["+forcedFlag+"]");
ITMDBAccessLocal itmDBAccessLocal = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
// check whether already confirmed or not // check whether already confirmed or not
...@@ -92,7 +91,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf ...@@ -92,7 +91,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
if( "Y".equalsIgnoreCase(confirmed)) if( "Y".equalsIgnoreCase(confirmed))
{ {
errString = itmDBAccessLocal.getErrorString("","VTDIST26",""); errString = itmDBAccessLocal.getErrorString("","VTDIST26","","",conn);
return errString; return errString;
} }
else else
...@@ -105,7 +104,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf ...@@ -105,7 +104,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
{ {
conn.rollback(); conn.rollback();
System.out.println("@@@@@@@@@ rollback successful..........."); System.out.println("@@@@@@@@@ rollback successful...........");
errString = itmDBAccessLocal.getErrorString("",errCode,""); errString = itmDBAccessLocal.getErrorString("",errCode,"","",conn);
System.out.println("@@@@@@@@@ confirm failed....."); System.out.println("@@@@@@@@@ confirm failed.....");
} }
else else
...@@ -113,7 +112,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf ...@@ -113,7 +112,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
conn.commit(); conn.commit();
// retString=generateTrackInfo(tranId,conn); // comment this method by mahendra // retString=generateTrackInfo(tranId,conn); // comment this method by mahendra
System.out.println("@@@@@@@@@ commit successful..........."); System.out.println("@@@@@@@@@ commit successful...........");
errString = itmDBAccessLocal.getErrorString("","VTCONFIRM",""); errString = itmDBAccessLocal.getErrorString("","VTCONFIRM","","",conn);
System.out.println("@@@@@@@@@ confirm successful..........."); System.out.println("@@@@@@@@@ confirm successful...........");
} }
} }
...@@ -158,7 +157,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf ...@@ -158,7 +157,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
String sql = "", sql1 = "", errCode = ""; String sql = "", sql1 = "", errCode = "";
Timestamp sysDate = null, lrDate=null,lrDateUpd=null; Timestamp sysDate = null, lrDate=null,lrDateUpd=null;
ibase.utility.E12GenericUtility genericUtility= new ibase.utility.E12GenericUtility(); ibase.utility.E12GenericUtility genericUtility= new ibase.utility.E12GenericUtility();
ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB(); //ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
int cntDist=0,cntConsIss=0; int cntDist=0,cntConsIss=0;
String confirmed="",lrNo="",lorryNo="",recallFrt="",despId="",lrNoUpd="",lorryNoUpd="",distOrdIssId="",conOrdIssId=""; 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; 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 ...@@ -678,7 +677,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
HashMap<String,String> tempMap = new HashMap<String,String>(); HashMap<String,String> tempMap = new HashMap<String,String>();
ArrayList tempList = null; ArrayList tempList = null;
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
ITMDBAccessLocal itmDBAccessLocal = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
try try
{ {
...@@ -738,7 +737,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf ...@@ -738,7 +737,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
else else
{ {
System.out.println("Shipment Id not found in despatch table"); System.out.println("Shipment Id not found in despatch table");
errString = itmDBAccessLocal.getErrorString("","VTSHIDEXST",""); errString = itmDBAccessLocal.getErrorString("","VTSHIDEXST","","",conn);
return errString; return errString;
} }
...@@ -861,7 +860,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf ...@@ -861,7 +860,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
if(despatchId == null) if(despatchId == null)
{ {
System.out.println("despatchId found null in ship_docs"); System.out.println("despatchId found null in ship_docs");
errString = itmDBAccessLocal.getErrorString("","VTDSIDEXST",""); errString = itmDBAccessLocal.getErrorString("","VTDSIDEXST","","",conn);
return errString; return errString;
} }
...@@ -1209,7 +1208,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf ...@@ -1209,7 +1208,7 @@ public class ShipmentLocConf extends ActionHandlerEJB implements ShipmentLocConf
System.out.println("failed!!!!"); System.out.println("failed!!!!");
conn.rollback(); conn.rollback();
errString = itmDBAccessLocal.getErrorString("","VTGTRTIFLD",""); errString = itmDBAccessLocal.getErrorString("","VTGTRTIFLD","","",conn);
return errString; 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