Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034756Retail ModulesStoreServerpublic2016-12-16 12:002016-12-20 09:29
AugustoMauch 
Sandrahuguet 
immediatemajorhave not tried
closedfixed 
5
 
 
AugustoMauch
Production - QA Approved
2016-08-19
RR16Q4
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/6ccbd09b41f4 [^]
No
0034756: Transaction left open leads to database locks when updating entries from the Mobile Server window
There is a bug in SetCurrentMobileServerListener that results in a transaction being left open if the mobile.server.key property is not defined in Openbravo.properties.

As a result of that transaction being left open, it will not be possible to update a mobile server that was already defined when Tomcat was last started because the uncommited transaction will cause a database lock.
- Make sure there is at least one entry in the obmobc_server_definition table.
- Make sure the mobile.server.key parameter is not defined in Openbravo.properties
- Start Tomcat
- After starting Tomcat, run this query in the database to check that one transaction has been left open: select * from pg_stat_activity where state <> 'idle' and query ilike '%server%';
- Open the Mobile Server window and try to modify an existing mobile server. The record will not be saved due to a lock in the database.
Make sure under all circumstances the connection is either commited or rolled back
No tags attached.
depends on backport 0034767RR16Q4.1 closed Sandrahuguet Transact left open leads to database locks when updating entries from the Mobile Server window 
caused by defect 0033692RR16Q4 closed mtaal Prevent NPE in case no mobile server definition present but still server key is set 
has duplicate defect 0034173 closed Sandrahuguet Connection leak in SetCurrentMobileServerListener 
has duplicate defect 0034967 closed platform the delete client process is not finishing 
Issue History
2016-12-16 12:00AugustoMauchNew Issue
2016-12-16 12:00AugustoMauchAssigned To => Sandrahuguet
2016-12-16 12:00AugustoMauchTriggers an Emergency Pack => No
2016-12-16 13:18hgbotCheckin
2016-12-16 13:18hgbotNote Added: 0092491
2016-12-16 13:18hgbotStatusnew => resolved
2016-12-16 13:18hgbotResolutionopen => fixed
2016-12-16 13:18hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/64da711454b7732e30477ac0598f9844442eb41d [^]
2016-12-16 13:19AugustoMauchReview Assigned To => AugustoMauch
2016-12-16 13:19AugustoMauchNote Added: 0092492
2016-12-16 13:19AugustoMauchStatusresolved => closed
2016-12-16 13:24SandrahuguetRegression level => Production - QA Approved
2016-12-16 13:24SandrahuguetRegression date => 2016-08-19
2016-12-16 13:24SandrahuguetRegression introduced in release => RR16Q4
2016-12-16 13:24SandrahuguetRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/6ccbd09b41f4 [^]
2016-12-19 11:06SandrahuguetStatusclosed => new
2016-12-19 11:06SandrahuguetResolutionfixed => open
2016-12-19 11:12SandrahuguetStatusnew => scheduled
2016-12-19 11:16AugustoMauchSummaryTransact left open leads to database locks when updating entries from the Mobile Server window => Transaction left open leads to database locks when updating entries from the Mobile Server window
2016-12-19 11:18shuehnerNote Added: 0092762
2016-12-19 11:19AugustoMauchStatusscheduled => resolved
2016-12-19 11:19AugustoMauchResolutionopen => fixed
2016-12-19 11:19AugustoMauchStatusresolved => closed
2016-12-20 09:29dmitry_mezentsevRelationship addedcaused by 0033692
2017-01-03 16:35SandrahuguetRelationship addedduplicate of 0034173
2017-01-03 16:36SandrahuguetRelationship replacedhas duplicate 0034173
2017-01-16 16:20caristuRelationship addedhas duplicate 0034967

Notes
(0092491)
hgbot   
2016-12-16 13:18   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 64da711454b7732e30477ac0598f9844442eb41d
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Fri Dec 16 13:17:42 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/64da711454b7732e30477ac0598f9844442eb41d [^]

Fixed issue 34756 properly commitAndClose in SetCurrentMobileServerListener

properly commitAndClose in SetCurrentMobileServerListener to avoid the
transaction left open leads to database locks when updating entries
from the Mobile Server window

---
M src/org/openbravo/mobile/core/listener/SetCurrentMobileServerListener.java
---
(0092492)
AugustoMauch   
2016-12-16 13:19   
Code reviewed and verified
(0092762)
shuehner   
2016-12-19 11:18   
Note: This will also prevent any exclusive locks on the table which are used for some maintenance.

This will block (while tomcat us running) indefinitely:
a.) ant import.sample.data
b.) Probably MMC rebuild if that update.database needs to touch obmobc_mobile_server table