Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
ID | |||||||||||
0036293 | |||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||||
design defect | [Openbravo ERP] A. Platform | minor | have not tried | 2017-06-20 11:11 | 2022-02-01 08:08 | ||||||
Reporter | alostale | View Status | public | ||||||||
Assigned To | Triage Platform Base | ||||||||||
Priority | normal | Resolution | open | Fixed in Version | |||||||
Status | acknowledged | Fix in branch | Fixed in SCM revision | ||||||||
Projection | none | ETA | none | Target Version | |||||||
OS | Any | Database | Any | Java version | |||||||
OS Version | Database version | Ant version | |||||||||
Product Version | SCM revision | ||||||||||
Review Assigned To | |||||||||||
Web browser | |||||||||||
Modules | Core | ||||||||||
Regression level | |||||||||||
Regression date | |||||||||||
Regression introduced in release | |||||||||||
Regression introduced by commit | |||||||||||
Triggers an Emergency Pack | No | ||||||||||
Summary | 0036293: XmlEngine page don't use DAL's connection | ||||||||||
Description | Documents generated with XmlEngine use their own ConnectionProvider set in HttpBaseServlet.init. This causes to keep a different connection than DAL's one, so a new connection is borrowed in the same thread whenever it is used. | ||||||||||
Steps To Reproduce | 1. Install DB Pool log module 2. Configure Openbravo.properties to log threads borrowing more than one connection: db.pool.logger.enabled=true db.pool.logger.logMultipleConnectionsPerThread=true 3. Open any xmlEngine generated page (ie. Login page) -> check logs: d05203b3 1241669 [http-bio-8080-exec-1] DEBUG reloadXml - XmlEngine 29-11-2001 Initialized d05203b3 1241680 [http-bio-8080-exec-1] 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.uiTranslation.TextInterfacesData.selectText(TextInterfacesData.java:107) org.openbravo.uiTranslation.TranslationUtils.retrieveLabelData(TranslationUtils.java:180) org.openbravo.uiTranslation.TranslationUtils.processFormLabels(TranslationUtils.java:33) org.openbravo.uiTranslation.TranslationHandler.processTranslations(TranslationHandler.java:216) d05203b3 1241680 [http-bio-8080-exec-1] WARN org.openbravo.util.db.DBPoolLogger - ** Listing other 1 active connections for this thread in addition to new PooledConnection[org.postgresql.jdbc.PgConnection@54bc2e89] ** d05203b3 1241680 [http-bio-8080-exec-1] WARN org.openbravo.util.db.DBPoolLogger - ===================== ACTIVE - Tue Jun 20 10:48:25 CEST 2017 - 1497948505899 - PooledConnection[org.postgresql.jdbc.PgConnection@1f6a0e8c] Thread: http-bio-8080-exec-1 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.OBQuery.getSession(OBQuery.java:542) org.openbravo.dal.service.OBQuery.createQuery(OBQuery.java:242) org.openbravo.dal.service.OBQuery.list(OBQuery.java:120) org.openbravo.erpCommon.businessUtility.Preferences.getPreferences(Preferences.java:462) | ||||||||||
Proposed Solution | It is not possible to use a DalConnectionProvider in HttpBaseServlet.init because it is not thread safe and it could be used at the same time from different threads. A thread safe solution would be to create a new DalConnectionProvider in XmlDocument.print method. The problem is current DalConnectionProvider is not accessible from src-core. | ||||||||||
Tags | No tags attached. | ||||||||||
Attached Files | |||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||
|
Issue History | |||
Date Modified | Username | Field | Change |
2017-06-20 11:11 | alostale | New Issue | |
2017-06-20 11:11 | alostale | Assigned To | => platform |
2017-06-20 11:11 | alostale | Modules | => Core |
2017-06-20 11:11 | alostale | Triggers an Emergency Pack | => No |
2017-06-20 11:12 | alostale | Relationship added | related to 0006360 |
2017-06-20 11:13 | alostale | Relationship added | related to 0035855 |
2017-06-20 11:13 | alostale | Status | new => acknowledged |
2022-02-01 08:08 | alostale | Assigned To | platform => Triage Platform Base |
Copyright © 2000 - 2009 MantisBT Group |