Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036228
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2017-06-12 13:462017-06-16 10:29
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q3
StatusclosedFix in branchFixed in SCM revisionbe9628eb6222
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036228: SimpleCallout used as ConnectionProvider borrows 2 connections in same thread

DescriptionWhen a SimpleCallout is used as ConnectionProvider (using this to get connection), it borrows a second connection in the thread in addition to the Dal's one.
Steps To Reproduce1. Install DB Pool log module [1]
2. Configure Openbravo.properties to log threads borrowing more than one connection:
     db.pool.logger.enabled=true
     db.pool.logger.logMultipleConnectionsPerThread=true
3. Login as Openbravo admin
4. Open any draft Sales Order
5. Change it's BP
  -> Check log:
d05203b3 1680166 [http-bio-8080-exec-3] WARN org.openbravo.util.db.DBPoolLogger - ***** Trying to get a connection in a thread that already has an active connection.
  org.openbravo.database.ConnectionProviderImpl.getNewConnection(ConnectionProviderImpl.java:260)
  org.openbravo.database.ConnectionProviderImpl.getConnection(ConnectionProviderImpl.java:236)
  org.openbravo.database.ConnectionProviderImpl.getPreparedStatement(ConnectionProviderImpl.java:369)
  org.openbravo.database.ConnectionProviderImpl.getPreparedStatement(ConnectionProviderImpl.java:361)
  org.openbravo.erpCommon.ad_callouts.DelegateConnectionProvider.getPreparedStatement(DelegateConnectionProvider.java:89)
  org.openbravo.erpCommon.businessUtility.BpartnerMiscData.select(BpartnerMiscData.java:103)
  org.openbravo.erpCommon.businessUtility.BpartnerMiscData.select(BpartnerMiscData.java:81)
  org.openbravo.erpCommon.ad_callouts.SE_Order_BPartner.execute(SE_Order_BPartner.java:56)


---
[1] http://centralrepository.openbravo.com/openbravo/org.openbravo.forge.ui/sso/ForgeModuleDetail/DB-Pool-Logging-Utilities [^]
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0035855 closedalostale many standard requests borrow more than one connection from DB 
related to design defect 0036067 closedmarkmm82 old callouts should be refactored to implement SimpleCallout 
depends on design defect 00323663.0PR16Q4 closedinigosanchez callout invocation ineficiencies 

-  Notes
(0097313)
hgbot (developer)
2017-06-12 13:54

Repository: erp/devel/pi
Changeset: be9628eb622282df600ce09ebd6be7ae5fb0375b
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Jun 12 13:52:53 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/be9628eb622282df600ce09ebd6be7ae5fb0375b [^]

fixed bug 36228: SimpleCallout borrows 2 connections in same thread

  When a SimpleCallout is used as ConnectionProvider (using this to get
  connection), it borrows a second connection in the thread in addition to the
  Dal's one.

  Fixed by obtaining ConnectionProvider instance from DAL's one, so that
  it reuses the same connection already borrowed in current thread.

  Note this is safe as callout instances are not shared among different threads.

---
M src/org/openbravo/erpCommon/ad_callouts/DelegateConnectionProvider.java
---
(0097337)
hudsonbot (developer)
2017-06-13 07:41

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/44d87c9454e7 [^]
Maturity status: Test
(0097437)
caristu (developer)
2017-06-16 10:29

Code reviewed + testing OK.

- Issue History
Date Modified Username Field Change
2017-06-12 13:46 alostale New Issue
2017-06-12 13:46 alostale Assigned To => alostale
2017-06-12 13:46 alostale Modules => Core
2017-06-12 13:46 alostale Triggers an Emergency Pack => No
2017-06-12 13:47 alostale Steps to Reproduce Updated View Revisions
2017-06-12 13:47 alostale Relationship added depends on 0032366
2017-06-12 13:47 alostale Relationship added related to 0035855
2017-06-12 13:48 alostale Review Assigned To => caristu
2017-06-12 13:48 alostale Tag Attached: Performance
2017-06-12 13:54 alostale Relationship added related to 0036067
2017-06-12 13:54 hgbot Checkin
2017-06-12 13:54 hgbot Note Added: 0097313
2017-06-12 13:54 hgbot Status new => resolved
2017-06-12 13:54 hgbot Resolution open => fixed
2017-06-12 13:54 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/be9628eb622282df600ce09ebd6be7ae5fb0375b [^]
2017-06-13 07:41 hudsonbot Checkin
2017-06-13 07:41 hudsonbot Note Added: 0097337
2017-06-16 10:29 caristu Note Added: 0097437
2017-06-16 10:29 caristu Status resolved => closed
2017-06-16 10:29 caristu Fixed in Version => 3.0PR17Q3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker