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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036290
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2017-06-20 09:392017-06-27 19:12
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityhighResolutionfixedFixed in VersionRR17Q3
StatusclosedFix in branchFixed in SCM revisionf6e4fcfeafd8
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036290: WebPOS login borrows 2 connections from DB pool

DescriptionWhenever a login is done in WebPOS 2 connections are borrowed from DB pool.
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 WebPOS
  -> Check log:
595dbc4c 2017-06-20 09:36:40,353 [http-bio-8181-exec-4] 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.base.HttpBaseServlet.getPreparedStatement(HttpBaseServlet.java:386)
  org.openbravo.base.secureApp.SeguridadData.isUserRole(SeguridadData.java:232)
  org.openbravo.base.secureApp.LoginUtils.validUserRole(LoginUtils.java:116)
  org.openbravo.base.secureApp.LoginUtils.fillSessionArguments(LoginUtils.java:203)

595dbc4c 2017-06-20 09:36:40,354 [http-bio-8181-exec-4] WARN org.openbravo.util.db.DBPoolLogger - ** Listing other 1 active connections for this thread in addition to new PooledConnection[org.postgresql.jdbc.PgConnection@4c7ec0bb] **
595dbc4c 2017-06-20 09:36:40,354 [http-bio-8181-exec-4] WARN org.openbravo.util.db.DBPoolLogger - ===================== ACTIVE - Tue Jun 20 09:36:40 CEST 2017 - 1497944200327 - PooledConnection[org.postgresql.jdbc.PgConnection@65792d8b]
  Thread: http-bio-8181-exec-4
   org.openbravo.dal.core.SessionHandler.getNewConnection(SessionHandler.java:300)
   org.openbravo.dal.core.SessionHandler.createSession(SessionHandler.java:235)
   org.openbravo.dal.core.SessionHandler.begin(SessionHandler.java:561)
   org.openbravo.dal.core.SessionHandler.getSession(SessionHandler.java:183)
   org.openbravo.dal.service.OBDal.createCriteria(OBDal.java:501)
   org.openbravo.authentication.basic.DefaultAuthenticationManager.checkIfPasswordExpired(DefaultAuthenticationManager.java:229)
   org.openbravo.authentication.basic.DefaultAuthenticationManager.doAuthenticate(DefaultAuthenticationManager.java:163)
   org.openbravo.authentication.AuthenticationManager.authenticate(AuthenticationManager.java:172)


---
[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 Openbravo ERP many standard requests borrow more than one connection from DB 

-  Notes
(0097501)
hgbot (developer)
2017-06-20 09:42

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: f6e4fcfeafd88d4c02b03a7529091439c485125f
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jun 20 09:42:07 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f6e4fcfeafd88d4c02b03a7529091439c485125f [^]

fixed bug 36290: WebPOS login borrows 2 connections from DB pool

  Fixed by re-using DAL's connections instead of getting it from Servlet's
  ConnectionProvider.

---
M src/org/openbravo/mobile/core/login/MobileCoreLoginHandler.java
---
(0097718)
caristu (manager)
2017-06-27 19:12

Code reviewed + tested OK: LoginUtils.fillSessionArguments does not borrow a second database connection after login.

- Issue History
Date Modified Username Field Change
2017-06-20 09:39 alostale New Issue
2017-06-20 09:39 alostale Assigned To => Retail
2017-06-20 09:39 alostale Triggers an Emergency Pack => No
2017-06-20 09:40 alostale Assigned To Retail => alostale
2017-06-20 09:40 alostale Review Assigned To => caristu
2017-06-20 09:40 alostale Relationship added related to 0035855
2017-06-20 09:40 alostale Tag Attached: Performance
2017-06-20 09:42 hgbot Checkin
2017-06-20 09:42 hgbot Note Added: 0097501
2017-06-20 09:42 hgbot Status new => resolved
2017-06-20 09:42 hgbot Resolution open => fixed
2017-06-20 09:42 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f6e4fcfeafd88d4c02b03a7529091439c485125f [^]
2017-06-27 19:12 caristu Note Added: 0097718
2017-06-27 19:12 caristu Status resolved => closed
2017-06-27 19:12 caristu Fixed in Version => RR17Q3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker