Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035994Openbravo ERPA. Platformpublic2017-05-15 11:362017-05-31 15:23
caristu 
caristu 
highminorN/A
closedfixed 
5
 
3.0PR17Q3 
alostale
Core
No
0035994: Web service calls should not create ad_session entries being in an instance with unlimited web service calls
Currently every web service call is creating a new record in the ad_session table. This is used to calculate if the maximum number of web service calls has been reached for the current instance.

This calculation is not needed in an instance with unlimited web service calls, so those ad_session records are unnecessary data which in environments that make intensive use of the web services are taking up a lot of space in the database.
In description
Performance
related to defect 0030031 closed alostale row created in ad_session for same cookie after every erp logout 
related to feature request 0032880 closed inigosanchez Instance Activation window should displayed information about WS calls, CU and active POS terminals. 
related to defect 0036141 closed alostale stateful WS calls create HttpSessions that live till Tomcat kills them 
related to defect 00363643.0PR17Q3 closed mtaal Http Sessions are registered in SessionListener with wrong session id, stateless requests should not be registered 
related to defect 0040813 closed caristu A NPE can be thrown when using the default web service authentication of the AuthenticationManager 
causes defect 0040897 closed alostale unreachable system after tying to create a record through ws with unlimited access license 
Issue History
2017-05-15 11:36caristuNew Issue
2017-05-15 11:36caristuAssigned To => platform
2017-05-15 11:36caristuModules => Core
2017-05-15 11:36caristuTriggers an Emergency Pack => No
2017-05-15 11:36caristuAssigned Toplatform => caristu
2017-05-15 11:36caristuStatusnew => scheduled
2017-05-15 11:41caristuTag Attached: Performance
2017-05-15 12:51caristuFile Added: issue35994.diff
2017-05-17 08:49caristuRelationship addedrelated to 0030031
2017-05-17 09:18caristuFile Deleted: issue35994.diff
2017-05-17 16:07hgbotCheckin
2017-05-17 16:07hgbotNote Added: 0096647
2017-05-18 09:06hgbotCheckin
2017-05-18 09:06hgbotNote Added: 0096655
2017-05-18 09:06hgbotStatusscheduled => resolved
2017-05-18 09:06hgbotResolutionopen => fixed
2017-05-18 09:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/383058dac5699aa263e209cbfcd10000b8153d3f [^]
2017-05-18 09:07caristuReview Assigned To => alostale
2017-05-18 09:17caristuRelationship addedrelated to 0032880
2017-05-18 12:32hgbotCheckin
2017-05-18 12:32hgbotNote Added: 0096659
2017-05-18 16:43shuehnerIssue Monitored: shuehner
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096974
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096975
2017-05-30 12:42alostaleNote Added: 0097008
2017-05-30 12:42alostaleStatusresolved => new
2017-05-30 12:42alostaleResolutionfixed => open
2017-05-30 16:05hgbotCheckin
2017-05-30 16:05hgbotNote Added: 0097017
2017-05-30 16:07caristuStatusnew => scheduled
2017-05-30 16:07caristuStatusscheduled => resolved
2017-05-30 16:07caristuResolutionopen => fixed
2017-05-30 17:01hgbotCheckin
2017-05-30 17:01hgbotNote Added: 0097020
2017-05-30 17:05alostaleRelationship addedrelated to 0036141
2017-05-30 17:19hgbotCheckin
2017-05-30 17:19hgbotNote Added: 0097023
2017-05-31 10:45alostaleNote Edited: 0097008bug_revision_view_page.php?bugnote_id=0097008#r15248
2017-05-31 11:02alostaleNote Added: 0097046
2017-05-31 11:02alostaleStatusresolved => closed
2017-05-31 11:02alostaleFixed in Version => 3.0PR17Q3
2017-05-31 15:23hudsonbotCheckin
2017-05-31 15:23hudsonbotNote Added: 0097051
2017-05-31 15:23hudsonbotCheckin
2017-05-31 15:23hudsonbotNote Added: 0097052
2017-07-03 10:11alostaleRelationship addedrelated to 0036364
2019-05-08 17:02caristuRelationship addedrelated to 0040813
2019-05-17 11:02alostaleRelationship addedcauses 0040897

Notes
(0096647)
hgbot   
2017-05-17 16:07   
Repository: erp/mods/org.openbravo.platform.features
Changeset: 796d12e92fd69916f9aa03a4dff87df96ff43853
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed May 17 16:07:04 2017 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.platform.features/rev/796d12e92fd69916f9aa03a4dff87df96ff43853 [^]

related to issue 35994: added stateless web service for testing purposes

---
A config/org.openbravo.platform.features-provider-config.xml
A src/org/openbravo/platform/features/service/BusinessPartnerCurrencyWebService.java
---
(0096655)
hgbot   
2017-05-18 09:06   
Repository: erp/devel/pi
Changeset: 383058dac5699aa263e209cbfcd10000b8153d3f
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu May 18 09:00:59 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/383058dac5699aa263e209cbfcd10000b8153d3f [^]

fixes bug 35994: WS should not create ad_session records having unlimited calls

When the authentication through the webServiceAuthenticate method is done, now if the request comes from a web service and the current license has unlimited web service calls then no record is created in the AD_Session because this record is just needed when the system calculates if the maximum number of web service calls has been reached.

---
M src/org/openbravo/authentication/AuthenticationManager.java
M src/org/openbravo/erpCommon/obps/ActivationKey.java
M src/org/openbravo/service/web/BaseWebServiceServlet.java
---
(0096659)
hgbot   
2017-05-18 12:32   
Repository: erp/devel/pi
Changeset: 0eb140120f4edb1dc63ad491d6ea69fb3e6fd3e2
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu May 18 12:30:55 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0eb140120f4edb1dc63ad491d6ea69fb3e6fd3e2 [^]

related to bug 35994: hide number of ws calls if the instance is unlimited

Do not show the number of ws calls performed throughout the day in the "Instance Activation" window if the current instance has unlimited number of ws calls.

---
M src/org/openbravo/erpCommon/obps/ActivationKey.java
---
(0096974)
hudsonbot   
2017-05-29 17:43   
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/1ee70113bdc4 [^]
Maturity status: Test
(0096975)
hudsonbot   
2017-05-29 17:43   
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/1ee70113bdc4 [^]
Maturity status: Test
(0097008)
alostale   
2017-05-30 12:42   
(edited on: 2017-05-31 10:45)
reopening due to code review:

-No need to set in request this is a WS call, as webServicePostAuthenticate is only called for WS
-don't get list of expired modules for every single WS call
-HttpSession is not created for steateful WS

(0097017)
hgbot   
2017-05-30 16:05   
Repository: erp/devel/pi
Changeset: a85be898ff3b3e51a53c2907c96305c426865497
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue May 30 16:00:32 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a85be898ff3b3e51a53c2907c96305c426865497 [^]

related to issue 35994: code review improvements
- No need to set in request this is a WS call, as webServicePostAuthenticate is only called for WS.
- Do not get list of expired modules for every single WS call.

---
M src/org/openbravo/authentication/AuthenticationManager.java
M src/org/openbravo/erpCommon/obps/ActivationKey.java
M src/org/openbravo/service/web/BaseWebServiceServlet.java
---
(0097020)
hgbot   
2017-05-30 17:01   
Repository: erp/devel/api-checks
Changeset: dc9f6f461f2bc0f30581bcf7fc0943b8296ce56d
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue May 30 17:00:55 2017 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/dc9f6f461f2bc0f30581bcf7fc0943b8296ce56d [^]

related to issue 35994: removed unneeded WS_CALL field from API

---
M java/reference/java.japi.gz
---
(0097023)
hgbot   
2017-05-30 17:19   
Repository: erp/devel/pi
Changeset: 0f858c02b0dd7ba077306cae051ffa9c5bdc05df
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue May 30 17:18:23 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0f858c02b0dd7ba077306cae051ffa9c5bdc05df [^]

related to issue 35994: create http session in stateful WS requests

It was missing to create the http session for the stateful WS requests being in an environment with unlimited WS access

---
M src/org/openbravo/authentication/AuthenticationManager.java
---
(0097046)
alostale   
2017-05-31 11:02   
code reviewed

Tested with limited and unlimited WS restriction and stateless and stateful WS calls. Working in all cases as expected AD_Session/HttpSession is created when it is supposed to.
(0097051)
hudsonbot   
2017-05-31 15:23   
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/e39fb42d847c [^]
Maturity status: Test
(0097052)
hudsonbot   
2017-05-31 15:23   
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/e39fb42d847c [^]
Maturity status: Test