Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040502Retail ModulesStoreServerpublic2019-04-01 14:442019-04-01 19:46
aaroncalero 
AugustoMauch 
highmajoralways
closedfixed 
5
 
 
mtaal
No
0040502: TransitionToOnline thread can leave open connections if the ReadOnly connection pool is used in a MobileServerTransitionToOnline
Using the DalConnectionProvider.getReadOnlyConnectionProvider() connection pool from a MobileServerTransitionToOnline can leave open connections after the TransitionToOnline has finished transitioning
In a configured multiserver environment:
Apply the attached patch in Mobile Core.
Change the status of a server (i.e. the Centra Server) to offline and execute the Server State Background background process to force the transition to online.
Once the process has finished and the server is online again, verify that there is still an open connection in the database, with the query shown in the patch.
When the TransitionToOnline[1] thread finishes, it should close all open connections , just like it is done in the DalThreadHandler
No tags attached.
diff OpenTransaction_TransitionToOnline.diff (960) 2019-04-01 14:44
https://issues.openbravo.com/file_download.php?file_id=12816&type=bug
Issue History
2019-04-01 14:44aaroncaleroNew Issue
2019-04-01 14:44aaroncaleroAssigned To => StoreServer
2019-04-01 14:44aaroncaleroFile Added: OpenTransaction_TransitionToOnline.diff
2019-04-01 14:44aaroncaleroResolution time => 1555279200
2019-04-01 14:44aaroncaleroTriggers an Emergency Pack => No
2019-04-01 18:24hgbotCheckin
2019-04-01 18:24hgbotNote Added: 0110950
2019-04-01 18:24hgbotStatusnew => resolved
2019-04-01 18:24hgbotResolutionopen => fixed
2019-04-01 18:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7f1540d2d6ab6611d1cfbff173c62338afa15ef3 [^]
2019-04-01 18:25AugustoMauchAssigned ToStoreServer => AugustoMauch
2019-04-01 18:25AugustoMauchReview Assigned To => mtaal
2019-04-01 19:46mtaalNote Added: 0110952
2019-04-01 19:46mtaalStatusresolved => closed

Notes
(0110950)
hgbot   
2019-04-01 18:24   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 7f1540d2d6ab6611d1cfbff173c62338afa15ef3
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Apr 01 18:24:26 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7f1540d2d6ab6611d1cfbff173c62338afa15ef3 [^]

Fixes issue 40502: Prevents connection leak during transition to offline/online

The code that executes transitions to online/offline in a separate thread was making sure that the
OBDal default connection was properly closed when the thread finishes. But it was missing to close
the read only transaction.

---
M src/org/openbravo/mobile/core/servercontroller/MobileMainServerCheck.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
---
(0110952)
mtaal   
2019-04-01 19:46   
reviewed and tested