Commit 8e960686 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@103335 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 53fc00af
......@@ -316,6 +316,18 @@ public class BugResolutionPrc extends ProcessEJB implements BugResolutionPrcLoca
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;
......
......@@ -815,6 +815,19 @@ public class CreditNotePrc extends ProcessEJB implements CreditNotePrcLocal, Cre
keyCol = rs.getString(2);
tranSer1 = rs.getString(3);
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cursor [Start]
if ( stmt != null )
{
stmt.close();
stmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cursor [End]
System.out.println("keyString=>"+keyString);
System.out.println("keyCol=>"+keyCol);
System.out.println("tranSer1"+tranSer1);
......
......@@ -1896,6 +1896,19 @@ private void insertSReturnDet(HashMap saleReturnDetMap,Connection conn)
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]
writeLog(filePtr,"keyString :"+keyString,true);
writeLog(filePtr,"keyCol :"+keyCol,true);
writeLog(filePtr,"tranSer1 :"+tranSer1,true);
......
......@@ -223,12 +223,25 @@ public class PODProcess extends ProcessEJB implements PODProcessLocal,
String sqlPODDate = "SELECT VAR_VALUE FROM DISPARM WHERE PRD_CODE='999999' AND VAR_NAME='POD_PRD_DATE'";
pstmt = conn.prepareStatement(sqlPODDate);
rs = pstmt.executeQuery();
while (rs.next()) {
while (rs.next())
{
disDate = rs.getString(1);
}
// [END] Code added by Sanket Girme [13-jul-15]
// 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]
if ("00".equalsIgnoreCase(custCodeFrm)
&& "ZZ".equalsIgnoreCase(custCodeTo)) {
......@@ -1363,6 +1376,19 @@ public class PODProcess extends ProcessEJB implements PODProcessLocal,
if (rs1.next()) {
varValue = rs1.getString(1);
}
// 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]
System.out.println("var value from diparm----->>[" + varValue + "]");
varValue = varValue == null ? "" : varValue.trim();
......
......@@ -910,6 +910,15 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
pstmt1.setString(8,sordNo);
pstmt1.setString(9,soLineNo);
pstmt1.executeUpdate();
// Changed by Sneha on 09-09-2016, for Closing the Open Cursor [Start]
if( pstmt1 != null )
{
pstmt1.close();
pstmt1 = null;
}
// Changed by Sneha on 09-09-2016, for Closing the Open Cursor [End]
}
rs.close();
rs=null;
......
......@@ -254,6 +254,7 @@ public class SordAtt extends ValidatorEJB implements SordAttLocal, SordAttRemote
}
}
}
sql="select count(*) from sales_pers where sales_pers = '"+columnValue+"'";
rs = stmt.executeQuery(sql);
......@@ -1942,6 +1943,19 @@ public class SordAtt extends ValidatorEJB implements SordAttLocal, SordAttRemote
{
priceListClg = rs.getString(1);
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [Start]
if ( stmtSatt != null )
{
stmtSatt.close();
stmtSatt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [End]
if(priceListClg != null)
{
valueXmlString.append("<price_list__clg>").append(priceListClg).append("</price_list__clg>\r\n");
......
......@@ -2833,7 +2833,18 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
keyCol = rSet.getString(2);
tranSer1 = rSet.getString(3);
}
// Changed by Sneha on 01-09-2016, for Closing the Open Cursor [Start]
if( stmt != null )
{
stmt.close();
stmt = null;
}
if ( rSet != null )
{
rSet.close();
rSet = null;
}
// Changed by Sneha on 01-09-2016, for Closing the Open Cursor [End]
java.util.Date date = null;
Timestamp timestamp = new Timestamp(System.currentTimeMillis());
System.out.println(genericUtility.getDBDateFormat());
......
......@@ -2257,6 +2257,18 @@ public class StockUpdate
keyCol = rs.getString(2);
tranSer1 = rs.getString(3);
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cursor [Start]
if ( stmt != null )
{
stmt.close();
stmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 21-07-2016, for Closing the Open Cursor [End]
System.out.println("keyString :"+keyString);
System.out.println("keyCol :"+keyCol);
System.out.println("tranSer1 :"+tranSer1);
......
......@@ -332,6 +332,19 @@ public class SupplierItem extends ValidatorEJB implements SupplierItemLocal,Supp
{
varValue = rs.getString(1);
}
// 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]
if("Y".equalsIgnoreCase(varValue))
{
sql = "select count(*) from site_supplier where site_code = ? and supp_code = ?";
......
......@@ -1019,6 +1019,19 @@ public class VerifyAll implements VerifyAllLocal, VerifyAllRemote
keyCol = lrs.getString(2);
tranSer = lrs.getString(3);
}
// 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]
String xmlValues = "";
xmlValues ="<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>";
xmlValues = xmlValues + "<Header></Header>";
......
......@@ -355,6 +355,13 @@ public class EnquiryAct extends ActionHandlerEJB implements EnquiryActLocal, Enq
{
varValue = rs.getString(1);
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [Start]
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [End]
}
System.out.println("Term Table :: "+varValue);
......@@ -768,6 +775,18 @@ public class EnquiryAct extends ActionHandlerEJB implements EnquiryActLocal, Enq
{
mVarValue = rs.getString(1);
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [Start]
if ( stmt != null )
{
stmt.close();
stmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [End]
if(mVarValue.equalsIgnoreCase("Y"))
{
sql = "SELECT COUNT(*) FROM SITE_SUPPLIER WHERE SITE_CODE = '" + siteCode + "' AND SUPP_CODE = '" + suppCode + "'";
......
......@@ -94,6 +94,18 @@ public class PcontractAct extends ActionHandlerEJB implements PcontractActLocal,
table = rs.getString(1);
System.out.println("table :"+table);
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [Start]
if ( stmt != null )
{
stmt.close();
stmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [End]
}
else
{
......
......@@ -1420,6 +1420,19 @@ public class SordAttConf extends ActionHandlerEJB implements SordAttConfLocal, S
{
ls_max_life = rs.getString(1);
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [Start]
if ( stmt != null )
{
stmt.close();
stmt = null;
}
if ( rs != null )
{
rs.close();
rs = null;
}
// Changed by Sneha on 12-09-2016, for Closing the Open Cursor [End]
ll_max_life = Long.parseLong(ls_max_life);
}
ll_temp = ll_max_life;
......
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