Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0021360 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | always | 2012-08-15 16:32 | 2012-08-29 16:36 | |||
Reporter | rafademiguel | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0MP15 | |||
Status | closed | Fix in branch | pi | Fixed in SCM revision | 72e0f315fe57 | |||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | marvintm | |||||||
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 | 0021360: DalConnectionProvider getTransactionConnection() should be equal than ConnectionProviderImpl getTransactionConnection() | |||||||
Description | The behaviour of DalConnectionProvider getTransactionConnection() should be equal than ConnectionProviderImpl getTransactionConnection(). Right now ConnectionProviderImpl getTransactionConnection() give a NEW connection and DalConnectionProvider getTransactionConnection() give the connection of the session. | |||||||
Steps To Reproduce | I have some code, is a Process Bundle so the connection provider are get: ProcessBundle.getConnection(); There is a moment that I need to call a method from a class that makes some inserts with XSQL, the class is like this: public OBError setAttributeInstance(ConnectionProvider conProv,.....) conn = conProv.getTransactionConnection(); ...... conProv.releaseCommitConnection(conn); } catch (Exception e) { .... conProv.releaseRollbackConnection(conn); } Whatever happens here I don't want rise an exception, I want my flow to continue. What's the matter? DalConnectionProvider() If I use new DalConnectionProvider() when they call getTransactionConnection(); it is giving to me this: connection = OBDal.getInstance().getConnection(flush); so if something goes wrong in my method the rollback affects to the things that happen in my method but also the things I have done before, so breaks my flow ConnectionProviderImpl(properties) However, if I use the old implementation ConnectionProviderImpl the getTransactionConnection(); is giving to me this /** * Gets a new connection without trying to obtain the sessions's one */ private Connection getNewConnection(String poolName) throws NoConnectionAvailableException {....} So its give a real NEW connection, so when I rollback, only rollback the things done in this conn and doesn't break my entire flow | |||||||
Proposed Solution | Modify DalConnectionProvider getTransactionConnection() in order to get a NEW connection. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0051403) hgbot (developer) 2012-08-20 22:06 |
Repository: erp/devel/pi Changeset: 72e0f315fe574302df9166185cdfca891d418a16 Author: Martin Taal <martin.taal <at> openbravo.com> Date: Mon Aug 20 18:26:36 2012 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/72e0f315fe574302df9166185cdfca891d418a16 [^] Fixes issue 21360: DalConnectionProvider getTransactionConnection() should be equal than ConnectionProviderImpl Use a statelesssession to create a new connection --- M src-test/org/openbravo/test/dal/IssuesTest.java M src/org/openbravo/service/db/DalConnectionProvider.java --- |
(0051409) mtaal (viewer) 2012-08-20 22:24 |
Set closed by |
(0051410) mtaal (viewer) 2012-08-20 22:24 |
. |
(0051411) mtaal (viewer) 2012-08-20 22:25 |
Resolved |
![]() |
|||
Date Modified | Username | Field | Change |
2012-08-15 16:32 | rafademiguel | New Issue | |
2012-08-15 16:32 | rafademiguel | Assigned To | => mtaal |
2012-08-15 16:32 | rafademiguel | Modules | => Core |
2012-08-15 16:32 | rafademiguel | OBNetwork customer | => No |
2012-08-20 22:06 | hgbot | Checkin | |
2012-08-20 22:06 | hgbot | Note Added: 0051403 | |
2012-08-20 22:06 | hgbot | Status | new => resolved |
2012-08-20 22:06 | hgbot | Resolution | open => fixed |
2012-08-20 22:06 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/72e0f315fe574302df9166185cdfca891d418a16 [^] |
2012-08-20 22:24 | mtaal | Note Added: 0051409 | |
2012-08-20 22:24 | mtaal | Status | resolved => new |
2012-08-20 22:24 | mtaal | Resolution | fixed => open |
2012-08-20 22:24 | mtaal | Closed by | => marvintm |
2012-08-20 22:24 | mtaal | Status | new => scheduled |
2012-08-20 22:24 | mtaal | Note Added: 0051410 | |
2012-08-20 22:24 | mtaal | fix_in_branch | => pi |
2012-08-20 22:25 | mtaal | Note Added: 0051411 | |
2012-08-20 22:25 | mtaal | Status | scheduled => resolved |
2012-08-20 22:25 | mtaal | Fixed in Version | => 3.0MP15 |
2012-08-20 22:25 | mtaal | Resolution | open => fixed |
2012-08-29 16:36 | marvintm | Status | resolved => closed |
2017-11-10 09:35 | caristu | Relationship added | related to 0037205 |
Copyright © 2000 - 2009 MantisBT Group |