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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0022737
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2013-01-08 13:222013-01-18 20:26
ReportermtaalView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in Version3.0MP20
StatusclosedFix in branchpiFixed in SCM revision9b99a04c51e9
ProjectionnoneETAnoneTarget Version3.0MP20
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0MP18.1SCM revision 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0022737: Close preparedstatement in DalSessionFactory

DescriptionThe DalSessionFactory.openSession creates a preparedstatement but does not close it. This should be done.
Steps To ReproduceDalSessionFactory.openSession check the code
Proposed SolutionClose the preparedstatement in a finally statement:

      PreparedStatement pstmt = null;
      try {
        final String dbSessionConfig = props.getProperty("bbdd.sessionConfig");
        pstmt = conn.prepareStatement(dbSessionConfig);
        pstmt.executeQuery();
      } catch (Exception e) {
        throw new IllegalStateException(e);
      } finally {
        try {
          if (pstmt != null && !pstmt.isClosed()) {
            pstmt.close();
          }
        } catch (SQLException e) {
          throw new OBException(e);
        }
      }
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00229233.0MP20 closedmtaal Cursors not closed 

-  Notes
(0055545)
hgbot (developer)
2013-01-16 13:37

Repository: erp/devel/pi
Changeset: 9b99a04c51e9ff85b095f7b1eb7bdb2f8a26e7e1
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Wed Jan 16 13:37:25 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9b99a04c51e9ff85b095f7b1eb7bdb2f8a26e7e1 [^]

Fixes issue 22737: Close preparedstatement in DalSessionFactory
Correctly close the statement in a finally block

---
M src/org/openbravo/dal/core/DalSessionFactory.java
---
(0055572)
AugustoMauch (manager)
2013-01-17 16:21

Code reviewed and verified in pi@45700993c14c
(0055634)
hudsonbot (developer)
2013-01-18 20:26

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/4cd4a6cc38e0 [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2013-01-08 13:22 mtaal New Issue
2013-01-08 13:22 mtaal Assigned To => mtaal
2013-01-08 13:22 mtaal Modules => Core
2013-01-08 13:22 mtaal Triggers an Emergency Pack => No
2013-01-08 13:22 mtaal Review Assigned To => AugustoMauch
2013-01-09 09:28 AugustoMauch Target Version 3.0MP19 => 3.0MP20
2013-01-14 10:48 AugustoMauch Status new => scheduled
2013-01-14 10:48 AugustoMauch fix_in_branch => pi
2013-01-16 13:37 hgbot Checkin
2013-01-16 13:37 hgbot Note Added: 0055545
2013-01-16 13:37 hgbot Status scheduled => resolved
2013-01-16 13:37 hgbot Resolution open => fixed
2013-01-16 13:37 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9b99a04c51e9ff85b095f7b1eb7bdb2f8a26e7e1 [^]
2013-01-17 16:21 AugustoMauch Note Added: 0055572
2013-01-17 16:21 AugustoMauch Status resolved => closed
2013-01-17 16:21 AugustoMauch Fixed in Version => 3.0MP20
2013-01-18 20:26 hudsonbot Checkin
2013-01-18 20:26 hudsonbot Note Added: 0055634
2013-01-29 15:55 egoitz Relationship added related to 0022923


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker