Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0037428 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
defect | [Openbravo ERP] Z. Others | minor | have not tried | 2017-12-01 07:59 | 2017-12-01 08:03 | |||||||
Reporter | alostale | View Status | public | |||||||||
Assigned To | Triage Omni OMS | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | new | 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 | 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 ... ... | |||||||||||
Tags | Performance | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
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 | View Revisions |
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 |
Copyright © 2000 - 2009 MantisBT Group |