Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0037428 | Openbravo ERP | Z. Others | public | 2017-12-01 07:59 | 2017-12-01 08:03 | |||||||
Reporter | alostale | |||||||||||
Assigned To | Triage Omni OMS | |||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | |||||||
Status | new | Resolution | open | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | |||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | ||||||||||||
OBNetwork customer | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0037428: don't use DalConnectionProvider default constructor | |||||||||||
Description | DalConnectionProvider's default constructor is equivalent to new DalConnectionProvider(true) which flushes Hibernate session. Default constructor shouldn't be used in favor of the more explicit boolean version. Note that as exposed by 0036638, flush occurs each time that ConnectionProvider acquires a connection which typically when used together with xsql is every time a query is executed. | |||||||||||
Steps To Reproduce | - | |||||||||||
Proposed Solution | // 1. This version shouldn't be used, does the developer really want a flush or she forgot to use the parameterized constructor? con = new DalConnectionProvider(); ... // 2. This version is better, we're more explicit about flushing con = new DalConnectionProvider(true); // we need to flush because ... ... // 3. This version is even better, don't delegate flushes to ConnectionProvider but to them explicitly con = new DalConnectionProvider(false); OBDal.getInstance().getSession().flush(); // we need to flush because ... ... | |||||||||||
Additional Information | ||||||||||||
Tags | Performance | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2017-12-01 07:59 | alostale | New Issue | ||||||||||
2017-12-01 07:59 | alostale | Assigned To | => Triage Finance | |||||||||
2017-12-01 07:59 | alostale | Modules | => Core | |||||||||
2017-12-01 07:59 | alostale | Triggers an Emergency Pack | => No | |||||||||
2017-12-01 08:02 | alostale | Description Updated | bug_revision_view_page.php?rev_id=16416#r16416 | |||||||||
2017-12-01 08:02 | alostale | Tag Attached: Performance | ||||||||||
2017-12-01 08:03 | alostale | Relationship added | related to 0036638 | |||||||||
2017-12-01 08:03 | alostale | Issue Monitored: alostale |
There are no notes attached to this issue. |