Commit 3468acc9 authored by msingh's avatar msingh

Changed by Manish on 01/04/16 for maximum cursor issue for DDUK .


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101066 ce508802-f39f-4f6c-b175-0d175dae99d5
parent db08d8de
...@@ -256,6 +256,18 @@ public class DespatchConfWiz extends ValidatorEJB implements DespatchConfWizLoca ...@@ -256,6 +256,18 @@ public class DespatchConfWiz extends ValidatorEJB implements DespatchConfWizLoca
serviceCode = rs.getString("SERVICE_CODE"); serviceCode = rs.getString("SERVICE_CODE");
compName = rs.getString("COMP_NAME"); compName = rs.getString("COMP_NAME");
} }
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
compName=compName==null ? "" :compName.trim(); compName=compName==null ? "" :compName.trim();
System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]"); System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]");
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? "; sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
...@@ -266,6 +278,18 @@ public class DespatchConfWiz extends ValidatorEJB implements DespatchConfWizLoca ...@@ -266,6 +278,18 @@ public class DespatchConfWiz extends ValidatorEJB implements DespatchConfWizLoca
{ {
serviceURI = rs.getString("SERVICE_URI"); serviceURI = rs.getString("SERVICE_URI");
} }
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
serviceURI=serviceURI==null ? "" :serviceURI.trim(); serviceURI=serviceURI==null ? "" :serviceURI.trim();
System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]"); System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]");
Service service = new Service(); Service service = new Service();
...@@ -307,6 +331,11 @@ public class DespatchConfWiz extends ValidatorEJB implements DespatchConfWizLoca ...@@ -307,6 +331,11 @@ public class DespatchConfWiz extends ValidatorEJB implements DespatchConfWizLoca
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if (rs !=null)
{
rs.close();
rs=null;
}
} }
catch(Exception e) catch(Exception e)
{ {
......
...@@ -324,6 +324,18 @@ public class DocTranPos extends ValidatorEJB implements DocTranPosLocal, DocTran ...@@ -324,6 +324,18 @@ public class DocTranPos extends ValidatorEJB implements DocTranPosLocal, DocTran
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
//Changed by Manish on 1-04-2016 to close prepared statement [START]
if(pstmtStock != null)
{
pstmtStock.close();
pstmtStock = null;
}
if(rsStock != null)
{
rsStock.close();
rsStock = null;
}
//Changed by Manish on 1-04-2016 to close prepared statement [END]
if (retString != null && retString.trim().length() > 0 ) if (retString != null && retString.trim().length() > 0 )
{ {
isError = true; isError = true;
......
...@@ -843,6 +843,19 @@ public class DockTranConf extends ValidatorEJB implements DockTranConfLocal,Dock ...@@ -843,6 +843,19 @@ public class DockTranConf extends ValidatorEJB implements DockTranConfLocal,Dock
} }
//Changed by wasim on 14-03-2016 to close prepared statement [END] //Changed by wasim on 14-03-2016 to close prepared statement [END]
//Changed by Manish on 1-04-2016 to close prepared statement [START]
if(pstmtStock != null)
{
pstmtStock.close();
pstmtStock = null;
}
if(rsStock != null)
{
rsStock.close();
rsStock = null;
}
//Changed by Manish on 1-04-2016 to close prepared statement [END]
if (retString != null && retString.trim().length() > 0 ) if (retString != null && retString.trim().length() > 0 )
{ {
isError = true; isError = true;
......
...@@ -709,7 +709,7 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT ...@@ -709,7 +709,7 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
{ {
//Changed by samadhan on 01/06/2015 for status tracking update in magento system.start //Changed by samadhan on 01/06/2015 for status tracking update in magento system.start
ShipmentStatus objShipment = new ShipmentStatus(); /*ShipmentStatus objShipment = new ShipmentStatus();
CommonWmsUtil wmsUtil = new CommonWmsUtil(); CommonWmsUtil wmsUtil = new CommonWmsUtil();
String apiShipUrl = wmsUtil.getDDSalesConfig("SHIP_STATUS_URL"); String apiShipUrl = wmsUtil.getDDSalesConfig("SHIP_STATUS_URL");
//Changed by wasim on 14-08-2015 to get api Key for magento [START] //Changed by wasim on 14-08-2015 to get api Key for magento [START]
...@@ -720,7 +720,7 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT ...@@ -720,7 +720,7 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
objShipment.setStatus("complete"); objShipment.setStatus("complete");
objShipment.setTrackingNumbers(wmsUtil.getTrackingNo(ptcn, conn)); objShipment.setTrackingNumbers(wmsUtil.getTrackingNo(ptcn, conn));
objShipment.setComment("Sale Order Complete"); objShipment.setComment("Sale Order Complete");
wmsUtil.CallTrackShipStatus(objShipment, apiShipUrl); wmsUtil.CallTrackShipStatus(objShipment, apiShipUrl); */
//Changed by samadhan on 01/06/2015 for status tracking update in magento system.end //Changed by samadhan on 01/06/2015 for status tracking update in magento system.end
...@@ -772,6 +772,23 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT ...@@ -772,6 +772,23 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
} }
pstmt.close();pstmt = null; pstmt.close();pstmt = null;
//Changed by Manish on 01/04/2016 for status tracking update in magento system after despatch confirm.[start]
System.out.println("status tracking update in magento start");
ShipmentStatus objShipment = new ShipmentStatus();
CommonWmsUtil wmsUtil = new CommonWmsUtil();
String apiShipUrl = wmsUtil.getDDSalesConfig("SHIP_STATUS_URL");
//Changed by wasim on 14-08-2015 to get api Key for magento [START]
String apiKey = wmsUtil.getDDSalesConfig("API_KEY");
objShipment.setApiKey(apiKey);
//Changed by wasim on 14-08-2015 to get api Key for magento [END]
objShipment.setOrderID(saleOrderL);
objShipment.setStatus("complete");
objShipment.setTrackingNumbers(wmsUtil.getTrackingNo(ptcn, conn));
objShipment.setComment("Sale Order Complete");
wmsUtil.CallTrackShipStatus(objShipment, apiShipUrl);
System.out.println("status tracking update in magento END");
//Changed by Manish on 01/04/2016 for status tracking update in magento system after despatch confirm.[end]
//Changed by Manish on [12/05/15] start //Changed by Manish on [12/05/15] start
String printer = ""; String printer = "";
printer = genericUtility.getColumnValue( "printer_name", dom ); printer = genericUtility.getColumnValue( "printer_name", dom );
...@@ -1909,6 +1926,18 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT ...@@ -1909,6 +1926,18 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
serviceCode = rs.getString("SERVICE_CODE"); serviceCode = rs.getString("SERVICE_CODE");
compName = rs.getString("COMP_NAME"); compName = rs.getString("COMP_NAME");
} }
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
compName=compName==null ? "" :compName.trim(); compName=compName==null ? "" :compName.trim();
System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]"); System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]");
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? "; sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
...@@ -1919,6 +1948,18 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT ...@@ -1919,6 +1948,18 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
{ {
serviceURI = rs.getString("SERVICE_URI"); serviceURI = rs.getString("SERVICE_URI");
} }
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
serviceURI=serviceURI==null ? "" :serviceURI.trim(); serviceURI=serviceURI==null ? "" :serviceURI.trim();
System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]"); System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]");
Service service = new Service(); Service service = new Service();
...@@ -1960,6 +2001,11 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT ...@@ -1960,6 +2001,11 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if (rs !=null)
{
rs.close();
rs=null;
}
} }
catch(Exception e) catch(Exception e)
{ {
......
...@@ -1271,7 +1271,18 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote, ...@@ -1271,7 +1271,18 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
serviceCode = rs.getString("SERVICE_CODE"); serviceCode = rs.getString("SERVICE_CODE");
compName = rs.getString("COMP_NAME"); compName = rs.getString("COMP_NAME");
} }
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (psmt != null)
{
psmt.close();
psmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
compName=compName==null ? "" :compName.trim(); compName=compName==null ? "" :compName.trim();
System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]"); System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]");
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? "; sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
...@@ -1283,7 +1294,18 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote, ...@@ -1283,7 +1294,18 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
serviceURI = rs.getString("SERVICE_URI"); serviceURI = rs.getString("SERVICE_URI");
} }
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (psmt != null)
{
psmt.close();
psmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
serviceURI=serviceURI==null ? "" :serviceURI.trim(); serviceURI=serviceURI==null ? "" :serviceURI.trim();
System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]"); System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]");
Service service = new Service(); Service service = new Service();
...@@ -1327,6 +1349,11 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote, ...@@ -1327,6 +1349,11 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
psmt.close(); psmt.close();
psmt = null; psmt = null;
} }
if (rs !=null)
{
rs.close();
rs=null;
}
} }
catch(Exception e){ catch(Exception e){
......
...@@ -901,11 +901,18 @@ public class MultiplePtcnWizConf extends ActionHandlerEJB implements MultiplePtc ...@@ -901,11 +901,18 @@ public class MultiplePtcnWizConf extends ActionHandlerEJB implements MultiplePtc
pstmt.close(); pstmt.close();
pstmt = null;//While close. pstmt = null;//While close.
} }
//Changed by Manish on 1-04-2016 to close prepared statement [START]
if(pstmtStock != null) if(pstmtStock != null)
{ {
pstmtStock.close(); pstmtStock.close();
pstmtStock = null; pstmtStock = null;
} }
if(rsStock != null)
{
rsStock.close();
rsStock = null;
}
//Changed by Manish on 1-04-2016 to close prepared statement [END]
if (errorString != null && errorString.trim().length() > 0 ) if (errorString != null && errorString.trim().length() > 0 )
{ {
......
...@@ -986,11 +986,18 @@ public class MultiplePtcnWizPos extends ValidatorEJB implements MultiplePtcnWizP ...@@ -986,11 +986,18 @@ public class MultiplePtcnWizPos extends ValidatorEJB implements MultiplePtcnWizP
pstmt.close(); pstmt.close();
pstmt = null;//While close. pstmt = null;//While close.
} }
//Changed by Manish on 1-04-2016 to close prepared statement [START]
if(pstmtStock != null) if(pstmtStock != null)
{ {
pstmtStock.close(); pstmtStock.close();
pstmtStock = null; pstmtStock = null;
} }
if(rsStock != null)
{
rsStock.close();
rsStock = null;
}
//Changed by Manish on 1-04-2016 to close prepared statement [END]
if (errorString != null && errorString.trim().length() > 0 ) if (errorString != null && errorString.trim().length() > 0 )
{ {
......
...@@ -277,6 +277,25 @@ public class PalletNoIC extends ValidatorEJB implements PalletNoICLocal, PalletN ...@@ -277,6 +277,25 @@ public class PalletNoIC extends ValidatorEJB implements PalletNoICLocal, PalletN
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
// Changed by Manish on 31/03/16 for validation on hold sale order [start]
if("DDUK".equalsIgnoreCase(projectCode))
{
sql= " SELECT DISTINCT(WT.PTCN) FROM WAVE_TASK_DET WT, SORDER S WHERE S.SALE_ORDER = WT.SALE_ORDER AND S.STATUS = 'H' AND WT.PTCN = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, palletNoDom.trim());
rs = pstmt.executeQuery();
if(rs.next())
{
System.out.println("sale order is hold");
errList.add( "VTSALHOLD1" );
errFields.add( childNodeName.toLowerCase() );
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
// Changed by Manish on 31/03/16 for validation on hold sale order [end]
//Changed By Pragyan 06/03/13 To check the trf status for records //Changed By Pragyan 06/03/13 To check the trf status for records
//sql = "SELECT PICK_ORDER,PICK_TYPE FROM PICK_ISS_HDR HDR WHERE HDR.PALLET_NO = ?"; //sql = "SELECT PICK_ORDER,PICK_TYPE FROM PICK_ISS_HDR HDR WHERE HDR.PALLET_NO = ?";
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Date : 15/10/2011 Date : 15/10/2011
Developer: Dipak Chattar Developer: Dipak Chattar
********************************************************/ ********************************************************/
package ibase.webitm.ejb.wms; package ibase.webitm.ejb.wms;
import javax.xml.rpc.ParameterMode; import javax.xml.rpc.ParameterMode;
...@@ -42,17 +42,17 @@ import ibase.webitm.utility.TransIDGenerator; ...@@ -42,17 +42,17 @@ import ibase.webitm.utility.TransIDGenerator;
@Stateless // added for ejb3 @Stateless // added for ejb3
public class PhysicalInvFreezeConf extends ActionHandlerEJB implements PhysicalInvFreezeConfLocal, PhysicalInvFreezeConfRemote public class PhysicalInvFreezeConf extends ActionHandlerEJB implements PhysicalInvFreezeConfLocal, PhysicalInvFreezeConfRemote
{ {
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
UtilMethods utilMethods = UtilMethods.getInstance(); UtilMethods utilMethods = UtilMethods.getInstance();
Random rnd = new Random(); Random rnd = new Random();
public String actionHandler() throws RemoteException,ITMException public String actionHandler() throws RemoteException,ITMException
{ {
System.out.println("actionHandler()return blank called >>>>>>>>>"); System.out.println("actionHandler()return blank called >>>>>>>>>");
return ""; return "";
} }
public String actionHandler(String actionType, String xmlString, String objContext, String xtraParams) throws RemoteException,ITMException public String actionHandler(String actionType, String xmlString, String objContext, String xtraParams) throws RemoteException,ITMException
{ {
Document dom = null; Document dom = null;
String resString = null; String resString = null;
try try
...@@ -93,10 +93,10 @@ public String actionHandler(String actionType, String xmlString, String objConte ...@@ -93,10 +93,10 @@ public String actionHandler(String actionType, String xmlString, String objConte
} }
System.out.println("returning from actionHandler"+resString); System.out.println("returning from actionHandler"+resString);
return resString; return resString;
} }
public String confirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException public String confirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException
{ {
String retString = "Confirmed Success"; String retString = "Confirmed Success";
String sql = ""; String sql = "";
Connection conn = null; Connection conn = null;
...@@ -150,7 +150,7 @@ public String confirm(String tranId, String xtraParams, String forcedFlag) throw ...@@ -150,7 +150,7 @@ public String confirm(String tranId, String xtraParams, String forcedFlag) throw
{ {
conn.commit(); conn.commit();
} }
//ADDED rollback //ADDED rollback
else else
{ {
System.out.println("shamim rollbacking >>>>>>>>>>"); System.out.println("shamim rollbacking >>>>>>>>>>");
...@@ -172,7 +172,7 @@ public String confirm(String tranId, String xtraParams, String forcedFlag) throw ...@@ -172,7 +172,7 @@ public String confirm(String tranId, String xtraParams, String forcedFlag) throw
{ {
e.printStackTrace(); e.printStackTrace();
} }
//added finally //added finally
finally finally
{ {
...@@ -208,10 +208,10 @@ public String confirm(String tranId, String xtraParams, String forcedFlag) throw ...@@ -208,10 +208,10 @@ public String confirm(String tranId, String xtraParams, String forcedFlag) throw
retString = errString.toString(); retString = errString.toString();
return retString; return retString;
} }
private String issueAdjReceiptAndIssue(String tranId,String xtraParams,String forcedFlag, Connection conn) throws RemoteException, ITMException private String issueAdjReceiptAndIssue(String tranId,String xtraParams,String forcedFlag, Connection conn) throws RemoteException, ITMException
{ {
FinCommon finCommon = new FinCommon(); FinCommon finCommon = new FinCommon();
String retSting = ""; String retSting = "";
String sql = ""; String sql = "";
...@@ -665,10 +665,10 @@ private String issueAdjReceiptAndIssue(String tranId,String xtraParams,String fo ...@@ -665,10 +665,10 @@ private String issueAdjReceiptAndIssue(String tranId,String xtraParams,String fo
} }
System.out.println("Dhawal result " +retSting); System.out.println("Dhawal result " +retSting);
return retSting; return retSting;
} }
public String confirmIssueAndReceipt(String businessObj, String tranIdFr,String xtraParams, String forcedFlag, Connection conn) throws ITMException public String confirmIssueAndReceipt(String businessObj, String tranIdFr,String xtraParams, String forcedFlag, Connection conn) throws ITMException
{ {
String methodName = ""; String methodName = "";
String compName = ""; String compName = "";
String retString = ""; String retString = "";
...@@ -694,6 +694,18 @@ public String confirmIssueAndReceipt(String businessObj, String tranIdFr,String ...@@ -694,6 +694,18 @@ public String confirmIssueAndReceipt(String businessObj, String tranIdFr,String
serviceCode = rs.getString("SERVICE_CODE"); serviceCode = rs.getString("SERVICE_CODE");
compName = rs.getString("COMP_NAME"); compName = rs.getString("COMP_NAME");
} }
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pStmt != null)
{
pStmt.close();
pStmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
System.out.println("serviceCode = "+serviceCode+" compName "+compName); System.out.println("serviceCode = "+serviceCode+" compName "+compName);
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? "; sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
pStmt = conn.prepareStatement(sql); pStmt = conn.prepareStatement(sql);
...@@ -703,6 +715,18 @@ public String confirmIssueAndReceipt(String businessObj, String tranIdFr,String ...@@ -703,6 +715,18 @@ public String confirmIssueAndReceipt(String businessObj, String tranIdFr,String
{ {
serviceURI = rs.getString("SERVICE_URI"); serviceURI = rs.getString("SERVICE_URI");
} }
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pStmt != null)
{
pStmt.close();
pStmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
System.out.println("serviceURI = "+serviceURI+" compName = "+compName); System.out.println("serviceURI = "+serviceURI+" compName = "+compName);
Service service = new Service(); Service service = new Service();
Call call = (Call)service.createCall(); Call call = (Call)service.createCall();
...@@ -743,17 +767,21 @@ public String confirmIssueAndReceipt(String businessObj, String tranIdFr,String ...@@ -743,17 +767,21 @@ public String confirmIssueAndReceipt(String businessObj, String tranIdFr,String
pStmt.close(); pStmt.close();
pStmt = null; pStmt = null;
} }
if (rs !=null)
{
rs.close();
rs=null;
}
} }
catch(Exception e) catch(Exception e)
{} {}
} }
return retString; return retString;
} }
private String importFromDatabase(Document dom, String objContext, String xtraParams) throws RemoteException , ITMException private String importFromDatabase(Document dom, String objContext, String xtraParams) throws RemoteException , ITMException
{ {
String siteCode = "", locCodeFrom = "", locCodeTo = ""; String siteCode = "", locCodeFrom = "", locCodeTo = "";
String itemSerFrom = "", itemSerTo = "", itemCodeFrom = "", itemCodeTo = ""; String itemSerFrom = "", itemSerTo = "", itemCodeFrom = "", itemCodeTo = "";
String sql = ""; String sql = "";
...@@ -879,11 +907,11 @@ private String importFromDatabase(Document dom, String objContext, String xtraPa ...@@ -879,11 +907,11 @@ private String importFromDatabase(Document dom, String objContext, String xtraPa
} }
System.out.println("valueXmlString.toString() :"+valueXmlString.toString()); System.out.println("valueXmlString.toString() :"+valueXmlString.toString());
return valueXmlString.toString(); return valueXmlString.toString();
} }
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
private String exportToExcel(Document dom, String objContext, String xtraParams) throws RemoteException , ITMException private String exportToExcel(Document dom, String objContext, String xtraParams) throws RemoteException , ITMException
{ {
NodeList parentNodeList=null; NodeList parentNodeList=null;
Node parentNode=null; Node parentNode=null;
String siteCode = ""; String siteCode = "";
...@@ -1001,11 +1029,11 @@ private String exportToExcel(Document dom, String objContext, String xtraParams) ...@@ -1001,11 +1029,11 @@ private String exportToExcel(Document dom, String objContext, String xtraParams)
return resultString; return resultString;
} }
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
private String importFromExcel(Document dom, String objContext, String xtraParams) throws RemoteException , ITMException private String importFromExcel(Document dom, String objContext, String xtraParams) throws RemoteException , ITMException
{ {
StringBuffer valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root>\r\n"); StringBuffer valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root>\r\n");
double stockQty = 0.0; double stockQty = 0.0;
double phyQty = 0.0; double phyQty = 0.0;
...@@ -1113,10 +1141,10 @@ private String importFromExcel(Document dom, String objContext, String xtraParam ...@@ -1113,10 +1141,10 @@ private String importFromExcel(Document dom, String objContext, String xtraParam
} }
return valueXmlString.toString(); return valueXmlString.toString();
} }
public String saveData(String siteCode,String xmlString, Connection conn) throws ITMException public String saveData(String siteCode,String xmlString, Connection conn) throws ITMException
{ {
System.out.println("saving data..........."); System.out.println("saving data...........");
InitialContext ctx = null; InitialContext ctx = null;
String retString = null; String retString = null;
...@@ -1145,7 +1173,7 @@ public String saveData(String siteCode,String xmlString, Connection conn) throws ...@@ -1145,7 +1173,7 @@ public String saveData(String siteCode,String xmlString, Connection conn) throws
throw new ITMException(e); throw new ITMException(e);
} }
return retString; return retString;
} }
private String getUniqueKey(String xmlValues, String keyString, String keyCol, String tranSer, String xtraParams,Connection conn)throws ITMException private String getUniqueKey(String xmlValues, String keyString, String keyCol, String tranSer, String xtraParams,Connection conn)throws ITMException
{ {
......
...@@ -349,6 +349,18 @@ public class SapSorderEJB extends ActionHandlerEJB implements SapSorderEJBLocal, ...@@ -349,6 +349,18 @@ public class SapSorderEJB extends ActionHandlerEJB implements SapSorderEJBLocal,
serviceCode = rs.getString("SERVICE_CODE"); serviceCode = rs.getString("SERVICE_CODE");
compName = rs.getString("COMP_NAME"); compName = rs.getString("COMP_NAME");
} }
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (psmt != null)
{
psmt.close();
psmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
compName=compName==null ? "" :compName.trim(); compName=compName==null ? "" :compName.trim();
System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]"); System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]");
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? "; sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
...@@ -359,6 +371,18 @@ public class SapSorderEJB extends ActionHandlerEJB implements SapSorderEJBLocal, ...@@ -359,6 +371,18 @@ public class SapSorderEJB extends ActionHandlerEJB implements SapSorderEJBLocal,
{ {
serviceURI = rs.getString("SERVICE_URI"); serviceURI = rs.getString("SERVICE_URI");
} }
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (psmt != null)
{
psmt.close();
psmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
serviceURI=serviceURI==null ? "" :serviceURI.trim(); serviceURI=serviceURI==null ? "" :serviceURI.trim();
System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]"); System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]");
Service service = new Service(); Service service = new Service();
...@@ -401,6 +425,11 @@ public class SapSorderEJB extends ActionHandlerEJB implements SapSorderEJBLocal, ...@@ -401,6 +425,11 @@ public class SapSorderEJB extends ActionHandlerEJB implements SapSorderEJBLocal,
psmt.close(); psmt.close();
psmt = null; psmt = null;
} }
if (rs !=null)
{
rs.close();
rs=null;
}
} }
catch(Exception e) catch(Exception e)
{ {
...@@ -1231,7 +1260,7 @@ public class SapSorderEJB extends ActionHandlerEJB implements SapSorderEJBLocal, ...@@ -1231,7 +1260,7 @@ public class SapSorderEJB extends ActionHandlerEJB implements SapSorderEJBLocal,
} }
return tranId; return tranId;
}//generateTranTd() }//generateTranTd()
*/ private HashMap getItemVoumeMap(String itemCode,String lotNo,Connection con)throws Exception */ private HashMap getItemVoumeMap(String itemCode,String lotNo,Connection con)throws Exception
{ {
double packSize = 0,itemSize = 0,lotSize = 0; double packSize = 0,itemSize = 0,lotSize = 0;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
...@@ -1798,7 +1827,7 @@ public class SapSorderEJB extends ActionHandlerEJB implements SapSorderEJBLocal, ...@@ -1798,7 +1827,7 @@ public class SapSorderEJB extends ActionHandlerEJB implements SapSorderEJBLocal,
} }
//For sap Integration //For sap Integration
public void writeClientXml(String clientXml) throws Exception public void writeClientXml(String clientXml) throws Exception
{ {
......
...@@ -3182,6 +3182,18 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -3182,6 +3182,18 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
compName = rs.getString("COMP_NAME"); compName = rs.getString("COMP_NAME");
} }
System.out.println("serviceCode = "+serviceCode+" compName "+compName); System.out.println("serviceCode = "+serviceCode+" compName "+compName);
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pStmt != null)
{
pStmt.close();
pStmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
sql = "SELECT SERVICE_URI,METHOD_NAME FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? "; sql = "SELECT SERVICE_URI,METHOD_NAME FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
pStmt = conn.prepareStatement(sql); pStmt = conn.prepareStatement(sql);
pStmt.setString(1,serviceCode); pStmt.setString(1,serviceCode);
...@@ -3192,6 +3204,18 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -3192,6 +3204,18 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
methodName=rs.getString("METHOD_NAME"); methodName=rs.getString("METHOD_NAME");
} }
System.out.println("serviceURI = "+serviceURI+" compName = "+compName); System.out.println("serviceURI = "+serviceURI+" compName = "+compName);
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pStmt != null)
{
pStmt.close();
pStmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
Service service = new Service(); Service service = new Service();
Call call = (Call)service.createCall(); Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(serviceURI)); call.setTargetEndpointAddress(new java.net.URL(serviceURI));
...@@ -3231,6 +3255,11 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -3231,6 +3255,11 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
pStmt.close(); pStmt.close();
pStmt = null; pStmt = null;
} }
if (rs !=null)
{
rs.close();
rs=null;
}
/*if( conn != null ){ /*if( conn != null ){
conn.close(); conn.close();
conn = null; conn = null;
......
...@@ -666,6 +666,18 @@ public class UploadOrderEJB extends ActionHandlerEJB implements UploadOrderEJBLo ...@@ -666,6 +666,18 @@ public class UploadOrderEJB extends ActionHandlerEJB implements UploadOrderEJBLo
} }
compName=compName==null ? "" :compName.trim(); compName=compName==null ? "" :compName.trim();
System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]"); System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]");
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (psmt != null)
{
psmt.close();
psmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? "; sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
psmt = conn.prepareStatement(sql); psmt = conn.prepareStatement(sql);
psmt.setString(1,serviceCode); psmt.setString(1,serviceCode);
...@@ -676,6 +688,18 @@ public class UploadOrderEJB extends ActionHandlerEJB implements UploadOrderEJBLo ...@@ -676,6 +688,18 @@ public class UploadOrderEJB extends ActionHandlerEJB implements UploadOrderEJBLo
} }
serviceURI=serviceURI==null ? "" :serviceURI.trim(); serviceURI=serviceURI==null ? "" :serviceURI.trim();
System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]"); System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]");
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (psmt != null)
{
psmt.close();
psmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
Service service = new Service(); Service service = new Service();
Call call = (Call)service.createCall(); Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(serviceURI)); call.setTargetEndpointAddress(new java.net.URL(serviceURI));
...@@ -716,6 +740,11 @@ public class UploadOrderEJB extends ActionHandlerEJB implements UploadOrderEJBLo ...@@ -716,6 +740,11 @@ public class UploadOrderEJB extends ActionHandlerEJB implements UploadOrderEJBLo
psmt.close(); psmt.close();
psmt = null; psmt = null;
} }
if (rs !=null)
{
rs.close();
rs=null;
}
} }
catch(Exception e) catch(Exception e)
{ {
...@@ -878,7 +907,7 @@ public class UploadOrderEJB extends ActionHandlerEJB implements UploadOrderEJBLo ...@@ -878,7 +907,7 @@ public class UploadOrderEJB extends ActionHandlerEJB implements UploadOrderEJBLo
pstmt.setString(2,"D"); //cust_type pstmt.setString(2,"D"); //cust_type
//Changed by Manish on 05/03/16 to set cust_name,sh_name up to size [start] //Changed by Manish on 05/03/16 to set cust_name,sh_name up to size [start]
// pstmt.setString(3, headerValesMap.get("buyer_name")); //cust_name // pstmt.setString(3, headerValesMap.get("buyer_name")); //cust_name
if (custName.length() > 50) if (custName.length() > 50)
{ {
pstmt.setString(3, custName.substring(0, 50)); //cust_name pstmt.setString(3, custName.substring(0, 50)); //cust_name
...@@ -888,7 +917,7 @@ public class UploadOrderEJB extends ActionHandlerEJB implements UploadOrderEJBLo ...@@ -888,7 +917,7 @@ public class UploadOrderEJB extends ActionHandlerEJB implements UploadOrderEJBLo
pstmt.setString(3, custName); //cust_name pstmt.setString(3, custName); //cust_name
} }
// pstmt.setString(4, headerValesMap.get("buyer_name")); //sh_name // pstmt.setString(4, headerValesMap.get("buyer_name")); //sh_name
/* if (custName.length() > 25) /* if (custName.length() > 25)
{ {
pstmt.setString(4, custName.substring(0, 25)); //sh_name pstmt.setString(4, custName.substring(0, 25)); //sh_name
......
...@@ -167,6 +167,18 @@ public class DDInvoiceConfSchedule implements Schedule ...@@ -167,6 +167,18 @@ public class DDInvoiceConfSchedule implements Schedule
} }
compName=compName==null ? "" :compName.trim(); compName=compName==null ? "" :compName.trim();
System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]"); System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]");
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? "; sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,serviceCode); pstmt.setString(1,serviceCode);
...@@ -177,6 +189,18 @@ public class DDInvoiceConfSchedule implements Schedule ...@@ -177,6 +189,18 @@ public class DDInvoiceConfSchedule implements Schedule
} }
serviceURI=serviceURI==null ? "" :serviceURI.trim(); serviceURI=serviceURI==null ? "" :serviceURI.trim();
System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]"); System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]");
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
Service service = new Service(); Service service = new Service();
Call call = (Call)service.createCall(); Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(serviceURI)); call.setTargetEndpointAddress(new java.net.URL(serviceURI));
...@@ -216,6 +240,11 @@ public class DDInvoiceConfSchedule implements Schedule ...@@ -216,6 +240,11 @@ public class DDInvoiceConfSchedule implements Schedule
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if (rs !=null)
{
rs.close();
rs=null;
}
} }
catch(Exception e) catch(Exception e)
{ {
......
...@@ -984,11 +984,18 @@ public class SorderInsertSchedule implements Schedule{ ...@@ -984,11 +984,18 @@ public class SorderInsertSchedule implements Schedule{
serviceCode = rs.getString("SERVICE_CODE"); serviceCode = rs.getString("SERVICE_CODE");
compName = rs.getString("COMP_NAME"); compName = rs.getString("COMP_NAME");
} }
if (rs != null ) // Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{ {
rs.close(); rs.close();
rs = null; rs=null;
} }
// Changed by Manish on 01/04/16 for max cursor issue [end]
compName=compName==null ? "" :compName.trim(); compName=compName==null ? "" :compName.trim();
System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]"); System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]");
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? "; sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
......
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