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
serviceCode = rs.getString("SERVICE_CODE");
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();
System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]");
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
......@@ -266,6 +278,18 @@ public class DespatchConfWiz extends ValidatorEJB implements DespatchConfWizLoca
{
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();
System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]");
Service service = new Service();
......@@ -307,6 +331,11 @@ public class DespatchConfWiz extends ValidatorEJB implements DespatchConfWizLoca
pstmt.close();
pstmt = null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
}
catch(Exception e)
{
......
......@@ -324,6 +324,18 @@ public class DocTranPos extends ValidatorEJB implements DocTranPosLocal, DocTran
rs = null;
pstmt.close();
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 )
{
isError = true;
......
......@@ -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 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 )
{
isError = true;
......
......@@ -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
ShipmentStatus objShipment = new ShipmentStatus();
/*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]
......@@ -720,7 +720,7 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
objShipment.setStatus("complete");
objShipment.setTrackingNumbers(wmsUtil.getTrackingNo(ptcn, conn));
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
......@@ -772,6 +772,23 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
}
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
String printer = "";
printer = genericUtility.getColumnValue( "printer_name", dom );
......@@ -1909,6 +1926,18 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
serviceCode = rs.getString("SERVICE_CODE");
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();
System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]");
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
......@@ -1919,6 +1948,18 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
{
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();
System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]");
Service service = new Service();
......@@ -1960,6 +2001,11 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
pstmt.close();
pstmt = null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
}
catch(Exception e)
{
......
......@@ -1271,7 +1271,18 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
serviceCode = rs.getString("SERVICE_CODE");
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();
System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]");
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
......@@ -1283,7 +1294,18 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
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();
System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]");
Service service = new Service();
......@@ -1327,6 +1349,11 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
psmt.close();
psmt = null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
}
catch(Exception e){
......
......@@ -901,11 +901,18 @@ public class MultiplePtcnWizConf extends ActionHandlerEJB implements MultiplePtc
pstmt.close();
pstmt = null;//While close.
}
//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 (errorString != null && errorString.trim().length() > 0 )
{
......
......@@ -986,11 +986,18 @@ public class MultiplePtcnWizPos extends ValidatorEJB implements MultiplePtcnWizP
pstmt.close();
pstmt = null;//While close.
}
//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 (errorString != null && errorString.trim().length() > 0 )
{
......
......@@ -277,6 +277,25 @@ public class PalletNoIC extends ValidatorEJB implements PalletNoICLocal, PalletN
rs = null;
pstmt.close();
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
//sql = "SELECT PICK_ORDER,PICK_TYPE FROM PICK_ISS_HDR HDR WHERE HDR.PALLET_NO = ?";
......
......@@ -3,7 +3,7 @@
Date : 15/10/2011
Developer: Dipak Chattar
********************************************************/
********************************************************/
package ibase.webitm.ejb.wms;
import javax.xml.rpc.ParameterMode;
......@@ -42,17 +42,17 @@ import ibase.webitm.utility.TransIDGenerator;
@Stateless // added for ejb3
public class PhysicalInvFreezeConf extends ActionHandlerEJB implements PhysicalInvFreezeConfLocal, PhysicalInvFreezeConfRemote
{
GenericUtility genericUtility = GenericUtility.getInstance();
UtilMethods utilMethods = UtilMethods.getInstance();
Random rnd = new Random();
public String actionHandler() throws RemoteException,ITMException
{
GenericUtility genericUtility = GenericUtility.getInstance();
UtilMethods utilMethods = UtilMethods.getInstance();
Random rnd = new Random();
public String actionHandler() throws RemoteException,ITMException
{
System.out.println("actionHandler()return blank called >>>>>>>>>");
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;
String resString = null;
try
......@@ -93,10 +93,10 @@ public String actionHandler(String actionType, String xmlString, String objConte
}
System.out.println("returning from actionHandler"+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 sql = "";
Connection conn = null;
......@@ -150,7 +150,7 @@ public String confirm(String tranId, String xtraParams, String forcedFlag) throw
{
conn.commit();
}
//ADDED rollback
//ADDED rollback
else
{
System.out.println("shamim rollbacking >>>>>>>>>>");
......@@ -172,7 +172,7 @@ public String confirm(String tranId, String xtraParams, String forcedFlag) throw
{
e.printStackTrace();
}
//added finally
//added finally
finally
{
......@@ -208,10 +208,10 @@ public String confirm(String tranId, String xtraParams, String forcedFlag) throw
retString = errString.toString();
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();
String retSting = "";
String sql = "";
......@@ -665,10 +665,10 @@ private String issueAdjReceiptAndIssue(String tranId,String xtraParams,String fo
}
System.out.println("Dhawal result " +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 compName = "";
String retString = "";
......@@ -694,6 +694,18 @@ public String confirmIssueAndReceipt(String businessObj, String tranIdFr,String
serviceCode = rs.getString("SERVICE_CODE");
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);
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
pStmt = conn.prepareStatement(sql);
......@@ -703,6 +715,18 @@ public String confirmIssueAndReceipt(String businessObj, String tranIdFr,String
{
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);
Service service = new Service();
Call call = (Call)service.createCall();
......@@ -743,17 +767,21 @@ public String confirmIssueAndReceipt(String businessObj, String tranIdFr,String
pStmt.close();
pStmt = null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
}
catch(Exception e)
{}
}
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 itemSerFrom = "", itemSerTo = "", itemCodeFrom = "", itemCodeTo = "";
String sql = "";
......@@ -879,11 +907,11 @@ private String importFromDatabase(Document dom, String objContext, String xtraPa
}
System.out.println("valueXmlString.toString() :"+valueXmlString.toString());
return valueXmlString.toString();
}
}
@SuppressWarnings("deprecation")
private String exportToExcel(Document dom, String objContext, String xtraParams) throws RemoteException , ITMException
{
@SuppressWarnings("deprecation")
private String exportToExcel(Document dom, String objContext, String xtraParams) throws RemoteException , ITMException
{
NodeList parentNodeList=null;
Node parentNode=null;
String siteCode = "";
......@@ -1001,11 +1029,11 @@ private String exportToExcel(Document dom, String objContext, String xtraParams)
return resultString;
}
}
@SuppressWarnings("deprecation")
private String importFromExcel(Document dom, String objContext, String xtraParams) throws RemoteException , ITMException
{
@SuppressWarnings("deprecation")
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");
double stockQty = 0.0;
double phyQty = 0.0;
......@@ -1113,10 +1141,10 @@ private String importFromExcel(Document dom, String objContext, String xtraParam
}
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...........");
InitialContext ctx = null;
String retString = null;
......@@ -1145,7 +1173,7 @@ public String saveData(String siteCode,String xmlString, Connection conn) throws
throw new ITMException(e);
}
return retString;
}
}
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,
serviceCode = rs.getString("SERVICE_CODE");
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();
System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]");
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
......@@ -359,6 +371,18 @@ public class SapSorderEJB extends ActionHandlerEJB implements SapSorderEJBLocal,
{
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();
System.out.println("serviceURI = ["+serviceURI+"]---> compName = ["+compName+"]");
Service service = new Service();
......@@ -401,6 +425,11 @@ public class SapSorderEJB extends ActionHandlerEJB implements SapSorderEJBLocal,
psmt.close();
psmt = null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
}
catch(Exception e)
{
......@@ -1231,7 +1260,7 @@ public class SapSorderEJB extends ActionHandlerEJB implements SapSorderEJBLocal,
}
return tranId;
}//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;
PreparedStatement pstmt = null;
......@@ -1798,7 +1827,7 @@ public class SapSorderEJB extends ActionHandlerEJB implements SapSorderEJBLocal,
}
//For sap Integration
//For sap Integration
public void writeClientXml(String clientXml) throws Exception
{
......
......@@ -3182,6 +3182,18 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
compName = rs.getString("COMP_NAME");
}
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 = ? ";
pStmt = conn.prepareStatement(sql);
pStmt.setString(1,serviceCode);
......@@ -3192,6 +3204,18 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
methodName=rs.getString("METHOD_NAME");
}
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();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(serviceURI));
......@@ -3231,6 +3255,11 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
pStmt.close();
pStmt = null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
/*if( conn != null ){
conn.close();
conn = null;
......
......@@ -666,6 +666,18 @@ public class UploadOrderEJB extends ActionHandlerEJB implements UploadOrderEJBLo
}
compName=compName==null ? "" :compName.trim();
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 = ? ";
psmt = conn.prepareStatement(sql);
psmt.setString(1,serviceCode);
......@@ -676,6 +688,18 @@ public class UploadOrderEJB extends ActionHandlerEJB implements UploadOrderEJBLo
}
serviceURI=serviceURI==null ? "" :serviceURI.trim();
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();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(serviceURI));
......@@ -716,6 +740,11 @@ public class UploadOrderEJB extends ActionHandlerEJB implements UploadOrderEJBLo
psmt.close();
psmt = null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
}
catch(Exception e)
{
......@@ -878,7 +907,7 @@ public class UploadOrderEJB extends ActionHandlerEJB implements UploadOrderEJBLo
pstmt.setString(2,"D"); //cust_type
//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)
{
pstmt.setString(3, custName.substring(0, 50)); //cust_name
......@@ -888,7 +917,7 @@ public class UploadOrderEJB extends ActionHandlerEJB implements UploadOrderEJBLo
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)
{
pstmt.setString(4, custName.substring(0, 25)); //sh_name
......
......@@ -167,6 +167,18 @@ public class DDInvoiceConfSchedule implements Schedule
}
compName=compName==null ? "" :compName.trim();
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 = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,serviceCode);
......@@ -177,6 +189,18 @@ public class DDInvoiceConfSchedule implements Schedule
}
serviceURI=serviceURI==null ? "" :serviceURI.trim();
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();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(serviceURI));
......@@ -216,6 +240,11 @@ public class DDInvoiceConfSchedule implements Schedule
pstmt.close();
pstmt = null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
}
catch(Exception e)
{
......
......@@ -984,11 +984,18 @@ public class SorderInsertSchedule implements Schedule{
serviceCode = rs.getString("SERVICE_CODE");
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 = null;
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
compName=compName==null ? "" :compName.trim();
System.out.println("serviceCode = ["+serviceCode+"] compName ["+compName+"]");
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