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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037428
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Z. Othersminorhave not tried2017-12-01 07:592017-12-01 08:03
ReporteralostaleView Statuspublic 
Assigned ToTriage Omni OMS 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0037428: don't use DalConnectionProvider default constructor

DescriptionDalConnectionProvider'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 ...
...
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0036638 newTriage Platform Base DalConnectionProvider(true) or () in combination with standard xsql causes 1 flush per SQL 

-  Notes
There are no notes attached to this issue.

- 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
Powered by Mantis Bugtracker