Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0022737 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2013-01-08 13:22 | 2013-01-18 20:26 | |||
Reporter | mtaal | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0MP20 | |||
Status | closed | Fix in branch | pi | Fixed in SCM revision | 9b99a04c51e9 | |||
Projection | none | ETA | none | Target Version | 3.0MP20 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | 3.0MP18.1 | SCM revision | ||||||
Merge Request Status | ||||||||
Review Assigned To | AugustoMauch | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0022737: Close preparedstatement in DalSessionFactory | |||||||
Description | The DalSessionFactory.openSession creates a preparedstatement but does not close it. This should be done. | |||||||
Steps To Reproduce | DalSessionFactory.openSession check the code | |||||||
Proposed Solution | Close 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); } } | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(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 (administrator) 2013-01-17 16:21 |
Code reviewed and verified in pi@45700993c14c |
(0055634) hudsonbot (viewer) 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 |
![]() |
|||
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 | OBNetwork customer | => No |
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 |