Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
| View Issue Details | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0021360 | Openbravo ERP | A. Platform | public | 2012-08-15 16:32 | 2012-08-29 16:36 | |||||||
| Reporter | rafademiguel | |||||||||||
| Assigned To | mtaal | |||||||||||
| Priority | normal | Severity | major | Reproducibility | always | |||||||
| Status | closed | Resolution | fixed | |||||||||
| Platform | OS | 5 | OS Version | |||||||||
| Product Version | ||||||||||||
| Target Version | Fixed in Version | 3.0MP15 | ||||||||||
| 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. | |||||||||||
| Additional Information | ||||||||||||
| Tags | No tags attached. | |||||||||||
| Relationships |
| |||||||||||
| Attached Files | ||||||||||||
| Issue History | ||||||||||||
| 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 | |||||||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||