Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029952Openbravo ERPA. Platformpublic2015-05-15 14:032015-05-25 11:11
yogaskarnik 
alostale 
immediatemajorhave not tried
closedfixed 
5
 
3.0PR15Q1.53.0PR15Q1.5 
AugustoMauch
Core
Production - Confirmed Stable
2014-10-28
3.0PR15Q1
https://code.openbravo.com/erp/devel/pi/rev/205fdc530e408b51a16a4d596c639339c607af95 [^]
No
0029952: 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
Approved
blocks defect 00299023.0PR15Q3 closed alostale ProcessBundle.setCloseConnection(false) has no impact when using DalBaseProcess, the connection is always closed 
Issue History
2015-05-21 09:30alostaleTypedefect => backport
2015-05-21 09:30alostaleTarget Version3.0PR15Q3 => 3.0PR15Q1.4
2015-05-22 08:43alostaleTarget Version3.0PR15Q1.4 => 3.0PR15Q1.5
2015-05-22 08:44alostaleReview Assigned To => AugustoMauch
2015-05-22 09:43dmitry_mezentsevTag Attached: Approved
2015-05-22 10:45hgbotCheckin
2015-05-22 10:45hgbotNote Added: 0077654
2015-05-22 10:45hgbotStatusscheduled => resolved
2015-05-22 10:45hgbotResolutionopen => fixed
2015-05-22 10:45hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q1.5/rev/44696cd0caad9435f8df5e9db1a90fc0b501a252 [^]
2015-05-25 11:11AugustoMauchNote Added: 0077692
2015-05-25 11:11AugustoMauchStatusresolved => closed
2015-05-25 11:11AugustoMauchFixed in Version => 3.0PR15Q1.5

Notes
(0077654)
hgbot   
2015-05-22 10:45   
Repository: erp/backports/3.0PR15Q1.5
Changeset: 44696cd0caad9435f8df5e9db1a90fc0b501a252
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu May 21 09:39:04 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q1.5/rev/44696cd0caad9435f8df5e9db1a90fc0b501a252 [^]

fixed bug 29952: 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
---
(0077692)
AugustoMauch   
2015-05-25 11:11   
Code reviewed and verified in [1]@3847b902dc3f

[1] https://code.openbravo.com/erp/backports/3.0PR15Q1.5/ [^]