Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034276Openbravo ERPA. Platformpublic2016-10-23 10:412016-12-16 18:38
mtaal 
mtaal 
normalminorhave not tried
closedfixed 
5
 
3.0PR17Q13.0PR17Q1 
alostale
Core
No
0034276: Login performance improvements: more precise obcontext cache and allow bypassing specific fill-session code
Specific code in the login functionality is targeted for backoffice users. This code is not used by most webservice or server to server requests. Therefore the proposal is to allow bypassing the more heavy logic which is only for backoffice usage.

Another improvement is to make the obcontext cache better usable, more precise so that cached. This prevents wrong use of a cached OBContext if the user has a different runtime organization/role than his/her default.
See related issue
By setting a http session variable direct the LoginUtils.fillSessionArgument to bypass specific parts which are only useful for backoffice logins.

For OBContext user cache, make the cache key more precise to also include the org and role.
No tags attached.
blocks defect 0034040 closed mtaal Retail Modules fillSessionArguments method is running twice processing a request 
Issue History
2016-10-23 10:41mtaalNew Issue
2016-10-23 10:41mtaalAssigned To => mtaal
2016-10-23 10:41mtaalModules => Core
2016-10-23 10:41mtaalTriggers an Emergency Pack => No
2016-10-23 10:41mtaalRelationship addedblocks 0034040
2016-10-23 10:42mtaalReview Assigned To => alostale
2016-10-23 10:47hgbotCheckin
2016-10-23 10:47hgbotNote Added: 0090785
2016-10-23 10:47hgbotStatusnew => resolved
2016-10-23 10:47hgbotResolutionopen => fixed
2016-10-23 10:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c50024821eda73c38e90c7708516a580b6567120 [^]
2016-11-04 08:30alostaleNote Added: 0091159
2016-11-04 08:30alostaleStatusresolved => closed
2016-11-04 08:30alostaleFixed in Version => 3.0PR17Q1
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092545

Notes
(0090785)
hgbot   
2016-10-23 10:47   
Repository: erp/devel/pi
Changeset: c50024821eda73c38e90c7708516a580b6567120
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Oct 23 10:46:31 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c50024821eda73c38e90c7708516a580b6567120 [^]

Fixes issue 34276: Login performance improvements: more precise obcontext cache and allow bypassing specific fill-session code

LoginUtils:
- do not create a new obcontext if the current one is already valid
- by setting a http session variable #Light_login to Y the fillSessionArgument will bypass specific logic. The larger diff is because the code is indented in an if-statement.

UserContextCache:
- Make obcontext caching more precise by also using role and org.

---
M src/org/openbravo/base/secureApp/LoginUtils.java
M src/org/openbravo/service/web/UserContextCache.java
---
(0091159)
alostale   
2016-11-04 08:30   
code reviewed

Note to make use of light_login, it's necessary to set that variable in session programmatically.
(0092545)
hudsonbot   
2016-12-16 18:38   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/dc8bf00badd0 [^]
Maturity status: Test