Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0008853Openbravo ERPA. Platformpublic2009-04-30 08:042009-05-10 00:00
mtaal 
mtaal 
normalmajorhave not tried
closedfixed 
5
pi 
pi2.50MP1 
Core
No
0008853: OBContext.setInAdministratorMode is not threadsafe
With ajax calls (and even with standard http requests) it is possible that multiple requests of one user end up at the server in the same time in different threads. If that happens then when one thread sets OBContext.setInAdministratorMode then other threads are influenced by that. This because the OBContext instance is shared by threads of the same user/httpsession.

The solution is to use a ThreadLocal to store the administrator mode flag of the OBContext. This flag has to be cleaned at the end of the request (in the dal request filter).
250MP1
blocks defect 0008449 closed iperdomo Autosave does not work when leaving the window via Alert,Role-change,Logout 
Issue History
2009-04-30 08:04mtaalNew Issue
2009-04-30 08:04mtaalAssigned To => mtaal
2009-04-30 08:04mtaalRegression testing => No
2009-04-30 08:33iperdomoRelationship addedblocks 0008449
2009-04-30 08:34iperdomoTag Attached: 250MP1
2009-05-01 13:27hgbotCheckin
2009-05-01 13:27hgbotNote Added: 0015993
2009-05-01 13:27hgbotStatusnew => resolved
2009-05-01 13:27hgbotResolutionopen => fixed
2009-05-01 13:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2cd6c5bbdee5e907088263d16ca8ca6e87c7a2b0 [^]
2009-05-09 18:57psarobeStatusresolved => closed
2009-05-09 18:57psarobeNote Added: 0016202
2009-05-10 00:00anonymoussf_bug_id0 => 2789549

Notes
(0015993)
hgbot   
2009-05-01 13:27   
Repository: erp/devel/pi
Changeset: 2cd6c5bbdee5e907088263d16ca8ca6e87c7a2b0
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri May 01 13:26:36 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2cd6c5bbdee5e907088263d16ca8ca6e87c7a2b0 [^]

Fixes issue 8853: OBContext.setInAdministratorMode is not threadsafe

---
M src-test/org/openbravo/test/AllAntTaskTests.java
M src-test/org/openbravo/test/AllQuickAntTaskTests.java
M src-test/org/openbravo/test/AntTaskTests.java
M src/org/openbravo/base/model/ModelProvider.java
M src/org/openbravo/dal/core/OBContext.java
A src-test/org/openbravo/test/dal/OBContextTest.java
---
(0016202)
psarobe   
2009-05-09 18:57   
Not able to tested. Not enough description but let's assume is ok