Notes |
|
(0107286)
|
hgbot
|
2018-10-15 10:42
|
|
Repository: erp/devel/pi
Changeset: 31f161352319157b70bc6c6d11ad1719cc5df556
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:18:19 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/31f161352319157b70bc6c6d11ad1719cc5df556 [^]
Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
When there is an exception in the critical part of the HttpSecureAppServlet which tries to detect if the client is authenticated, we should not necessarily force a logout and reply with '401- Not authenticated' response. Instead, the appropriate action is to just return a '500-Internal Server Error' response. Logging out in this case may kill a valid request when the server is temporarily overloaded, and makes no sense, and the 401 response may confuse the client, thinking that it needs to do login again when in reality, the problem is just that the server is either overloaded, or affected by some serious problem which prevents even basic authentication checking to work.
---
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
---
|
|
|
(0107287)
|
hgbot
|
2018-10-15 10:42
|
|
|
|
(0107288)
|
hgbot
|
2018-10-15 10:43
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: d8a54fc7c2683e641af3aaba83f9db35fdbc5ab8
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Sun Oct 14 10:58:08 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d8a54fc7c2683e641af3aaba83f9db35fdbc5ab8 [^]
Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
Two changes have been made:
- In the main Terminal request, if the response is not a known message, then most probably it is a critical error which happened in the server when trying to compute the terminal. In this case, it is better to try to force an offline login than block the process, as this may otherwise make it impossible to do an offline login in the system when the server is affected by some serious problem.
- In the loginUtils request, if the request fails with an unexpected error, we will try to continue with the main flow to allow an offline login to be completed.
---
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---
|
|
|
(0107289)
|
hgbot
|
2018-10-15 10:43
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: c73d499af2679e0df61e2f7d08fa62340efba4dd
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:25:04 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c73d499af2679e0df61e2f7d08fa62340efba4dd [^]
Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
Added some basic check with a database query. Modified the response to ensure that it follows a correct format.
---
M src/org/openbravo/mobile/core/login/CheckServerAvailability.java
---
|
|
|
(0107290)
|
hgbot
|
2018-10-15 10:43
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 54d25661ddc24983b27c2d6916332b659357cc3d
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:27:03 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/54d25661ddc24983b27c2d6916332b659357cc3d [^]
Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
If server ran out of connections, we will generate an '500-Internal Server Error'. Otherwise, if it's just a normal Exception, we assume that it is a plain defect in functional code which should not be considered cause of a general server problem, and will return a standard error with a 200 response.
---
M src/org/openbravo/mobile/core/login/MobileCoreLoginUtilsServlet.java
---
|
|
|
(0107291)
|
hgbot
|
2018-10-15 10:43
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 5b04e6405abddbe3437e107ceb102df41930a4e8
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:28:07 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/5b04e6405abddbe3437e107ceb102df41930a4e8 [^]
Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
Do not catch Throwables, we just let them leak to super classes, in which they will be handled correctly (will still return '500 Internal Server error' in this case)
---
M src/org/openbravo/mobile/core/process/MobileService.java
---
|
|
|
(0107292)
|
hgbot
|
2018-10-15 10:43
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: e78063c7fddfe836b3b98e5380713594f9e65045
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:28:46 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e78063c7fddfe836b3b98e5380713594f9e65045 [^]
Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
Do not catch Throwables, we just let them leak to super classes, in which they will be handled correctly (will still return '500 Internal Server error' in this case).
---
M src/org/openbravo/mobile/core/process/WebServiceAbstractServlet.java
---
|
|
|
(0107293)
|
hgbot
|
2018-10-15 10:43
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: b0f80aa0446b1426f43e8843d9a3f037b5b71f74
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:30:22 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b0f80aa0446b1426f43e8843d9a3f037b5b71f74 [^]
Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
> Avoid setting wrong (unauthorized) state, in case HttpSecureAppServlet was affected by an exception in a critical part, and returned a 500 state
---
M src/org/openbravo/mobile/core/process/WebServiceAuthenticatedServlet.java
---
|
|
|
(0107294)
|
hgbot
|
2018-10-15 10:43
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 283ba9e128a4e165f06c38f924d1815cdc52f083
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:31:33 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/283ba9e128a4e165f06c38f924d1815cdc52f083 [^]
Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
Ensure transitionToOnline counter correctly resets to the next step, in case of CheckServerAvailability error.
---
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---
|
|
|
(0107295)
|
hgbot
|
2018-10-15 10:43
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: a16a113b5f65ce8cc671f1bead1a54a8b569bc52
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:32:22 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a16a113b5f65ce8cc671f1bead1a54a8b569bc52 [^]
Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
When doing offline login ensure that when connectedToERP variable changes due to the load of the Terminal object from cache, this doesn't affect the rest of the login process.
---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
|
|
|
(0107296)
|
hgbot
|
2018-10-15 10:43
|
|
|
|
(0107336)
|
hgbot
|
2018-10-16 14:15
|
|
|
|
|
|
|
|
|
|
|
|