Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030120Openbravo ERP09. Financial managementpublic2015-06-07 15:282015-06-11 00:49
mtaal 
AtulOpenbravo 
normalminorhave not tried
closedfixed 
5
 
3.0PR15Q3 
vmromanos
Core
No
0030120: ScrollableResults object should be closed
In Oracle not closing a ScrollableResults results in a memory leak. I found several places in the functional code where this was indeed not done. These are listed below.
See these classes:
org.openbravo.costing.LandedCostDistributionByAmount
org.openbravo.costing.LandedCostProcess
org.openbravo.costing.LCMatchingProcess
org.openbravo.costing.StandardCostAdjustment
org.openbravo.event.GLJournalEventHandler (close is within if block, should not)
close the ScrollableResults in a finally block:
    ScrollableResults receiptamts = qryLCRLA.scroll(ScrollMode.FORWARD_ONLY);
    int i = 0;
    try {
     while (receiptamts.next()) {
      log.debug("Process receipt amounts");
      Object[] receiptAmt = receiptamts.get();
     }
    } finally {
     receiptamts.close();
    }
No tags attached.
related to defect 00301193.0PR15Q3 closed caristu Openbravo ERP ScrollableResults object should be closed 
related to defect 0030118RR15Q3 closed mtaal Retail Modules ScrollableResults object should be closed 
Issue History
2015-06-07 15:28mtaalNew Issue
2015-06-07 15:28mtaalAssigned To => Triage Finance
2015-06-07 15:28mtaalModules => Core
2015-06-07 15:28mtaalTriggers an Emergency Pack => No
2015-06-07 15:29mtaalRelationship addedrelated to 0030119
2015-06-07 15:33mtaalRelationship addedrelated to 0030118
2015-06-10 06:02AtulOpenbravoAssigned ToTriage Finance => AtulOpenbravo
2015-06-10 06:02AtulOpenbravoStatusnew => scheduled
2015-06-10 17:04hgbotCheckin
2015-06-10 17:04hgbotNote Added: 0078186
2015-06-10 17:04hgbotStatusscheduled => resolved
2015-06-10 17:04hgbotResolutionopen => fixed
2015-06-10 17:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ba00fcc9d5bf81ba13af873a3ba95a9af9131009 [^]
2015-06-10 17:05hgbotCheckin
2015-06-10 17:05hgbotNote Added: 0078187
2015-06-10 17:06vmromanosReview Assigned To => vmromanos
2015-06-10 17:06vmromanosNote Added: 0078188
2015-06-10 17:06vmromanosStatusresolved => closed
2015-06-11 00:49hudsonbotCheckin
2015-06-11 00:49hudsonbotNote Added: 0078201
2015-06-11 00:49hudsonbotCheckin
2015-06-11 00:49hudsonbotNote Added: 0078202

Notes
(0078186)
hgbot   
2015-06-10 17:04   
Repository: erp/devel/pi
Changeset: ba00fcc9d5bf81ba13af873a3ba95a9af9131009
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Jun 10 09:56:13 2015 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/ba00fcc9d5bf81ba13af873a3ba95a9af9131009 [^]

Fixes Issue 30120:ScrollableResults object should be closed

ScrollableResults objects are closed in a finally block.

---
M src/org/openbravo/costing/LCMatchingProcess.java
M src/org/openbravo/costing/LandedCostDistributionByAmount.java
M src/org/openbravo/costing/LandedCostProcess.java
M src/org/openbravo/costing/StandardCostAdjustment.java
M src/org/openbravo/event/GLJournalEventHandler.java
---
(0078187)
hgbot   
2015-06-10 17:05   
Repository: erp/devel/pi
Changeset: 4c6de7a747e1edb3d396337d066e3676286b675c
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Jun 10 17:02:19 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4c6de7a747e1edb3d396337d066e3676286b675c [^]

Related to issue 30120: Applied OB code format

---
M src/org/openbravo/costing/StandardCostAdjustment.java
M src/org/openbravo/event/GLJournalEventHandler.java
---
(0078188)
vmromanos   
2015-06-10 17:06   
Code review OK
(0078201)
hudsonbot   
2015-06-11 00:49   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/29888743cfde [^]
Maturity status: Test
(0078202)
hudsonbot   
2015-06-11 00:49   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/29888743cfde [^]
Maturity status: Test