Commit 53fc00af authored by smestry's avatar smestry

Updated the EJB for Open Cursor


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103326 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c76bc4ae
......@@ -309,6 +309,18 @@ public class DDPordWizAmdEJB extends ValidatorEJB implements DDPordWizAmdEJBRemo
{
paramName = rsCnt.getInt("COUNT");
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [Start]
if ( pstmtParamName != null )
{
pstmtParamName.close();
pstmtParamName = null;
}
if ( rsCnt != null )
{
rsCnt.close();
rsCnt = null;
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [End]
if (paramName == 0)
{
......
......@@ -139,6 +139,18 @@ public class DDProductWizEJB extends ValidatorEJB implements DDProductWizRemote,
{
paramName = rsCnt.getInt("COUNT");
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [Start]
if( pstmtParamName != null )
{
pstmtParamName.close();
pstmtParamName = null;
}
if ( rsCnt != null )
{
rsCnt.close();
rsCnt = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [End]
if (paramName != 0) {
......@@ -161,6 +173,18 @@ public class DDProductWizEJB extends ValidatorEJB implements DDProductWizRemote,
{
paramName = rsCnt.getInt("COUNT");
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [Start]
if( pstmtParamName != null )
{
pstmtParamName.close();
pstmtParamName = null;
}
if ( rsCnt != null )
{
rsCnt.close();
rsCnt = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [End]
if (paramName != 0) {
......@@ -183,6 +207,18 @@ public class DDProductWizEJB extends ValidatorEJB implements DDProductWizRemote,
{
paramName = rsCnt.getInt("COUNT");
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [Start]
if( pstmtParamName != null )
{
pstmtParamName.close();
pstmtParamName = null;
}
if ( rsCnt != null )
{
rsCnt.close();
rsCnt = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [End]
/*if (paramName == 0) {
......@@ -205,6 +241,18 @@ public class DDProductWizEJB extends ValidatorEJB implements DDProductWizRemote,
{
paramName = rsCnt.getInt("COUNT");
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [Start]
if( pstmtParamName != null )
{
pstmtParamName.close();
pstmtParamName = null;
}
if ( rsCnt != null )
{
rsCnt.close();
rsCnt = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [End]
}
else if (childNodeName.equalsIgnoreCase("grp_code"))
{
......@@ -220,6 +268,19 @@ public class DDProductWizEJB extends ValidatorEJB implements DDProductWizRemote,
{
paramName = rsCnt.getInt("COUNT");
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [Start]
if( pstmtParamName != null )
{
pstmtParamName.close();
pstmtParamName = null;
}
if ( rsCnt != null )
{
rsCnt.close();
rsCnt = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [End]
}
else if (childNodeName.equalsIgnoreCase("site_codes"))
{
......@@ -243,6 +304,18 @@ public class DDProductWizEJB extends ValidatorEJB implements DDProductWizRemote,
{
paramName = rsCnt.getInt("COUNT");
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [Start]
if( pstmtParamName != null )
{
pstmtParamName.close();
pstmtParamName = null;
}
if ( rsCnt != null )
{
rsCnt.close();
rsCnt = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [End]
if (paramName == 0)
{
......@@ -274,6 +347,18 @@ public class DDProductWizEJB extends ValidatorEJB implements DDProductWizRemote,
{
paramName = rsCnt.getInt("COUNT");
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [Start]
if( pstmtParamName != null )
{
pstmtParamName.close();
pstmtParamName = null;
}
if ( rsCnt != null )
{
rsCnt.close();
rsCnt = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [End]
if (paramName == 0)
{
......@@ -306,6 +391,18 @@ public class DDProductWizEJB extends ValidatorEJB implements DDProductWizRemote,
{
paramName = rsCnt.getInt("COUNT");
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [Start]
if( pstmtParamName != null )
{
pstmtParamName.close();
pstmtParamName = null;
}
if ( rsCnt != null )
{
rsCnt.close();
rsCnt = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [End]
if (paramName == 0)
{
......@@ -366,6 +463,18 @@ public class DDProductWizEJB extends ValidatorEJB implements DDProductWizRemote,
{
paramName = rsCnt.getInt("COUNT");
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [Start]
if( pstmtParamName != null )
{
pstmtParamName.close();
pstmtParamName = null;
}
if ( rsCnt != null )
{
rsCnt.close();
rsCnt = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [End]
if (paramName != 0)
{
......@@ -574,6 +683,20 @@ public class DDProductWizEJB extends ValidatorEJB implements DDProductWizRemote,
{
strLocId = rs.getString(1);
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [Start]
//pstmt=null;
//rs=null;
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [End]
pstmt=null;
rs=null;
......@@ -589,8 +712,20 @@ public class DDProductWizEJB extends ValidatorEJB implements DDProductWizRemote,
locDescr = rs.getString(2);
locType = rs.getString(3);
}
pstmt=null;
rs=null;
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [Start]
//pstmt=null;
//rs=null;
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [End]
}
System.out.println("Location code = "+locCode);
System.out.println("Location Descr = "+locDescr);
......
......@@ -191,6 +191,18 @@ public class DDProductWizEditEJB extends ValidatorEJB implements DDProductWizEdi
{
paramName = rsCnt.getInt("COUNT");
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cursor [Start]
if( pstmtParamName != null )
{
pstmtParamName.close();
pstmtParamName = null;
}
if ( rsCnt != null )
{
rsCnt.close();
rsCnt = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cursor [End]
if (paramName == 0) {
......@@ -233,6 +245,18 @@ public class DDProductWizEditEJB extends ValidatorEJB implements DDProductWizEdi
{
paramName = rsCnt.getInt("COUNT");
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cursor [Start]
if( pstmtParamName != null )
{
pstmtParamName.close();
pstmtParamName = null;
}
if ( rsCnt != null )
{
rsCnt.close();
rsCnt = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cursor [End]
if (paramName != 0)
{
......@@ -446,9 +470,8 @@ public class DDProductWizEditEJB extends ValidatorEJB implements DDProductWizEdi
break;
case 2:
{
System.out.println("---------- Inside itemChanged Case2 --------- ");
String itemCode = genericUtility.getColumnValue("item_code", dom1);
System.out.println("---------- Inside itemChanged Case2 --------- " + itemCode);
valueXmlString.append("<Detail2 domID='1' selected = 'Y'>\r\n");
if( currentColumn.trim().equalsIgnoreCase( "itm_default" ))
......@@ -619,7 +642,6 @@ public class DDProductWizEditEJB extends ValidatorEJB implements DDProductWizEdi
" ,TAX_CHAP "+ // Added by wasim on 02-08-2016 to get tax_chap
" FROM ITEM WHERE ITEM_CODE = '"+ itemCode +"'";
pstmt = conn.prepareStatement(itemParentSelect);
rs = pstmt.executeQuery();
while(rs.next())
......@@ -933,7 +955,6 @@ public class DDProductWizEditEJB extends ValidatorEJB implements DDProductWizEdi
}
// Changed by Sneha on 07-07-2016, to edit the item parent description [End]
}
}
try
......@@ -1188,6 +1209,19 @@ public class DDProductWizEditEJB extends ValidatorEJB implements DDProductWizEdi
valueXmlString.append("</Detail3>\r\n");
count++;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cursor [Start]
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cursor [End]
}
catch(Exception e)
{
......
......@@ -2083,6 +2083,14 @@ public class DDProductWizPosEJB extends ValidatorEJB implements DDProductWizPosR
pstmt.setInt(1, simpleProductId);
pstmt.setString(2, itemCode);
count = pstmt.executeUpdate();
// Changed by Sneha on 02-09-2016, for Closing the Open Cursor [Start]
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
// Changed by Sneha on 02-09-2016, for Closing the Open Cursor [End]
}
catch(Exception e)
{
......
......@@ -1337,7 +1337,18 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
keyCol = rSet.getString("TRAN_ID_COL");
tranSer1 = rSet.getString("REF_SER");
}
// Changed by Sneha on 09-09-2016, for Closing the Open Cursor [Start]
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if ( rSet != null )
{
rSet.close();
rSet = null;
}
// Changed by Sneha on 09-09-2016, for Closing the Open Cursor [End]
SimpleDateFormat sdfAppl = new SimpleDateFormat(genericUtility.getApplDateFormat());
......
......@@ -432,7 +432,10 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
segPayStatus = segPayStatus == null ? "" : segPayStatus.trim();
System.out.println("segPayStatus@@------->>["+segPayStatus+"]");
if(segPayStatus.indexOf("INVALID") > 0)
// Changed by Sneha on 12-09-2016, to check the failed status for segpay [Start]
//if(segPayStatus.indexOf("INVALID") > 0)
if(segPayStatus.indexOf("INVALID") > 0 || segPayStatus.indexOf("Declined") > 0)
// Changed by Sneha on 12-09-2016, to check the failed status for segpay [End]
{
isError = true;
System.out.println("Sage Payment not successfully done....................");
......
......@@ -3242,8 +3242,19 @@ public class GeneShipLabelsPrc extends ProcessEJB implements GeneShipLabelsPrcLo
keyCol = rSet.getString("TRAN_ID_COL");
tranSer1 = rSet.getString("REF_SER");
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cursor [Start]
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if ( rSet != null )
{
rSet.close();
rSet = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cursor [End]
SimpleDateFormat sdfAppl = new SimpleDateFormat(genericUtility.getApplDateFormat());
currDate = new java.sql.Timestamp(System.currentTimeMillis());
......
......@@ -257,6 +257,18 @@ public class POCaseWizIC extends ValidatorEJB implements POCaseWizICRemote, POCa
{
paramName = rsCnt.getInt("COUNT");
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [Start]
if( pstmtParamName != null )
{
pstmtParamName.close();
pstmtParamName = null;
}
if ( rsCnt != null )
{
rsCnt.close();
rsCnt = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cusor [End]
if (paramName == 0)
{
......
......@@ -840,6 +840,18 @@ public class PalletOutPos extends ValidatorEJB implements PalletOutPosLocal, Pal
keyCol = rs.getString(2);
tranSer1 = rs.getString(3);
}
// Changed by Sneha on 01-09-2016, for Closing the Open Cursor [Start]
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 01-09-2016, for Closing the Open Cursor [End]
}
rs.close();
rs = null;
......
......@@ -1641,7 +1641,19 @@ private String disParmValue( Connection conn , String disparmVar ) throws ITMExc
if( rs.next())
{
varValue = (rs.getString("VAR_VALUE")).trim();
}
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [Start]
if ( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [End]
}
catch (Exception ex)
{
......@@ -2379,7 +2391,18 @@ private String disParmValue( Connection conn , String disparmVar ) throws ITMExc
{
currCodeBase = checkNull( rs.getString("CURR_CODE") );
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [Start]
if ( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [End]
sql = "SELECT SUM(CASE WHEN QUANTITY IS NULL THEN 0 ELSE QUANTITY END * CASE WHEN RATE IS NULL THEN 0 ELSE RATE END) " +
" AS AMOUNT FROM PORDDET WHERE PURC_ORDER = ? ";
......@@ -2743,6 +2766,19 @@ private String disParmValue( Connection conn , String disparmVar ) throws ITMExc
valueXmlString.append("</Detail3>\r\n");
}
// Changed by Sneha on 01-09-2016, for Closing the Open Cusor [Start]
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 01-09-2016, for Closing the Open Cusor [End]
}
else
{
......
......@@ -2378,8 +2378,19 @@ public class PoRcpIC extends ValidatorEJB implements PoRcpICRemote, PoRcpICLocal
{
currCodeBase = checkNull( rs.getString("CURR_CODE") );
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [Start]
if ( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [End]
sql = "SELECT SUM(CASE WHEN QUANTITY IS NULL THEN 0 ELSE QUANTITY END * CASE WHEN RATE IS NULL THEN 0 ELSE RATE END) " +
" AS AMOUNT FROM PORDDET WHERE PURC_ORDER = ? ";
pstmt = conn.prepareStatement(sql);
......
......@@ -2394,7 +2394,19 @@ public class PoRcpRmPmIC extends ValidatorEJB implements PoRcpRmPmICRemote, PoRc
if( rs.next())
{
varValue = (rs.getString("VAR_VALUE")).trim();
}
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [Start]
if ( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [End]
}
catch (Exception ex)
{
......@@ -3171,7 +3183,18 @@ public class PoRcpRmPmIC extends ValidatorEJB implements PoRcpRmPmICRemote, PoRc
{
currCodeBase = checkNull( rs.getString("CURR_CODE") );
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [Start]
if ( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [End]
sql = "SELECT SUM(CASE WHEN QUANTITY IS NULL THEN 0 ELSE QUANTITY END * CASE WHEN RATE IS NULL THEN 0 ELSE RATE END) " +
" AS AMOUNT FROM PORDDET WHERE PURC_ORDER = ? ";
......
......@@ -2516,6 +2516,18 @@ public class SalesReturnConf extends ActionHandlerEJB implements SalesReturnConf
keyCol = rs.getString(2);
tranSer1 = rs.getString(3);
}
// Changed by Sneha on 01-09-2016, for Closing the Open Cursor [Start]
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 01-09-2016, for Closing the Open Cursor [End]
}
rs.close();
rs = null;
......@@ -2667,6 +2679,19 @@ public class SalesReturnConf extends ActionHandlerEJB implements SalesReturnConf
{
itemDescr = checkNull(rs.getString(1));
}
// Changed by Sneha on 01-09-2016, for Closing the Open Cursor [Start]
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 01-09-2016, for Closing the Open Cursor [End]
System.out.println("custName----------["+custName+"]");
System.out.println("refundAmount----------["+refundAmount+"]");
System.out.println("saleOrder----------["+saleOrder+"]");
......
......@@ -2037,6 +2037,18 @@ public class SapSorderEJB extends ActionHandlerEJB implements SapSorderEJBLocal,
keyCol = lrs.getString( "TRAN_ID_COL" );
tranSer = lrs.getString( "REF_SER" );
}
// Changed by Sneha on 01-09-2016, for Closing the Open Cursor [Start]
if( lstmt != null )
{
lstmt.close();
lstmt = null;
}
if ( lrs != null )
{
lrs.close();
lrs = null;
}
// Changed by Sneha on 01-09-2016, for Closing the Open Cursor [End]
}
lrs.close();
lrs = null;
......
......@@ -18251,6 +18251,19 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
keyCol = rSet.getString("TRAN_ID_COL");
tranSer1 = rSet.getString("REF_SER");
}
// Changed by Sneha on 01-09-2016, for Closing the Open Cursor [Start]
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if ( rSet != null )
{
rSet.close();
rSet = null;
}
// Changed by Sneha on 01-09-2016, for Closing the Open Cursor [End]
//Changed by Gulzar on 5/12/2012
/*
String tokenField = "tran_date";
......@@ -18325,7 +18338,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
{
pstmt.close();
pstmt=null;
}
}
}
catch(Exception e)
{
......
......@@ -363,6 +363,13 @@ public class MagentoProductSchedule implements Schedule
pstmt.setInt(1, simpleProductId);
pstmt.setString(2, itemCode);
count = pstmt.executeUpdate();
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [Start]
if ( pstmt != null )
{
pstmt.close();
pstmt = null;
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [End]
}
catch(Exception e)
{
......
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