Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029902Openbravo ERPA. Platformpublic2015-05-15 14:032015-05-25 10:17
yogaskarnik 
alostale 
immediateminorhave not tried
closedfixed 
5
 
3.0PR15Q3pi 
AugustoMauch
Core
Production - Confirmed Stable
2014-10-28
3.0PR15Q1
https://code.openbravo.com/erp/devel/pi/rev/205fdc530e408b51a16a4d596c639339c607af95 [^]
No
0029902: ProcessBundle.setCloseConnection(false) has no impact when using DalBaseProcess, the connection is always closed
DalBaseProcess closes the connection when called from another process. When you explicitly set the value to false for closeConnection method of bundle object, following error occurs:

javax.servlet.ServletException: @CODE=@connnection proxy not usable after
transaction completion
at
org.openbravo.scheduling.ProcessRequestData.update(ProcessRequestData.java:26
9)
at org.openbravo.scheduling.ProcessRunner.execute(ProcessRunner.java:93)
1. Write a custom process extending DalBaseProcess
2. set bundle.setCloseConnection() to false
No tags attached.
related to design defect 0020580 closed mtaal DalBaseProcess always closes the connection 
depends on backport 00299513.0PR15Q2.2 closed alostale ProcessBundle.setCloseConnection(false) has no impact when using DalBaseProcess, the connection is always closed 
depends on backport 00299523.0PR15Q1.5 closed alostale ProcessBundle.setCloseConnection(false) has no impact when using DalBaseProcess, the connection is always closed 
caused by defect 0027878 closed marvintm Code in DalConnectionprovider relate to getTransactionConnection seems to leak db connections always 
Issue History
2015-05-15 14:03yogaskarnikNew Issue
2015-05-15 14:03yogaskarnikAssigned To => platform
2015-05-15 14:03yogaskarnikModules => Core
2015-05-15 14:03yogaskarnikResolution time => 1432504800
2015-05-15 14:03yogaskarnikTriggers an Emergency Pack => No
2015-05-15 15:12egoitzSeveritycritical => major
2015-05-19 11:21yogaskarnikDescription Updatedbug_revision_view_page.php?rev_id=8581#r8581
2015-05-19 11:21yogaskarnikSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8583#r8583
2015-05-21 08:40alostaleRelationship addedcaused by 0027878
2015-05-21 09:24alostaleRelationship addedrelated to 0020580
2015-05-21 09:25alostaleAssigned Toplatform => alostale
2015-05-21 09:27alostaleRegression level => Production - Confirmed Stable
2015-05-21 09:27alostaleRegression date => 2014-10-28
2015-05-21 09:27alostaleRegression introduced in release => 3.0PR15Q1
2015-05-21 09:27alostaleRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/205fdc530e408b51a16a4d596c639339c607af95 [^]
2015-05-21 09:27alostaleStatusnew => scheduled
2015-05-21 09:30alostaleStatusscheduled => acknowledged
2015-05-21 09:30alostaleStatusacknowledged => scheduled
2015-05-21 10:32hgbotCheckin
2015-05-21 10:32hgbotNote Added: 0077614
2015-05-21 10:32hgbotStatusscheduled => resolved
2015-05-21 10:32hgbotResolutionopen => fixed
2015-05-21 10:32hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4ecfba1d868c127c76dafdb5afe6b1bf5670e499 [^]
2015-05-21 10:32hgbotCheckin
2015-05-21 10:32hgbotNote Added: 0077615
2015-05-21 10:46alostaleNote Added: 0077616
2015-05-21 10:46alostaleSeveritymajor => minor
2015-05-21 10:52alostaleReview Assigned To => AugustoMauch
2015-05-21 22:54hudsonbotCheckin
2015-05-21 22:54hudsonbotNote Added: 0077642
2015-05-21 22:54hudsonbotCheckin
2015-05-21 22:54hudsonbotNote Added: 0077643
2015-05-25 10:17AugustoMauchNote Added: 0077687
2015-05-25 10:17AugustoMauchStatusresolved => closed
2015-05-25 10:17AugustoMauchFixed in Version => pi

Notes
(0077614)
hgbot   
2015-05-21 10:32   
Repository: erp/devel/pi
Changeset: 4ecfba1d868c127c76dafdb5afe6b1bf5670e499
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu May 21 09:39:04 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4ecfba1d868c127c76dafdb5afe6b1bf5670e499 [^]

fixed bug 29902: ProcessBundle.setCloseConnection(false) closes connection

  When a process is invoked through ProcessRunner and its bundle is set as
  setCloseConnection(false) there were 2 problems:
    - connection was close after execution so it could not be reused by another
      process invoking it
    - ProcessRunner tried to update the process run status on a closed connection
      causing an error

  The problem is caused by the fix for issue 0027878 which correctly closes the
  connection in DalConnectionProvider when invoking releaseCommitConnection. But
  when setCloseConnection it relied in that bug not closing the connection to
  leave it open.

  The solution consists in doing directly the commit or rollback in DalBaseProcess
  without closing the connection.

---
M src/org/openbravo/service/db/DalBaseProcess.java
---
(0077615)
hgbot   
2015-05-21 10:32   
Repository: erp/devel/pi
Changeset: f74892c7bc32382ff9918cf35783a4fe4ad354d5
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu May 21 10:32:06 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f74892c7bc32382ff9918cf35783a4fe4ad354d5 [^]

related to bug 29902: added test case

---
M src-test/src/org/openbravo/test/AllAntTaskTests.java
A src-test/src/org/openbravo/test/scheduling/ProcessSchedulingTest.java
---
(0077616)
alostale   
2015-05-21 10:46   
Downgrading severity from major to minor because it only affects in very specific cases.
(0077642)
hudsonbot   
2015-05-21 22:54   
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/78fa6e8fdcad [^]
Maturity status: Test
(0077643)
hudsonbot   
2015-05-21 22:54   
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/78fa6e8fdcad [^]
Maturity status: Test
(0077687)
AugustoMauch   
2015-05-25 10:17   
Code reviewed and verified in pi@c702e1364264