Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0035601 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] StoreServer | minor | have not tried | 2017-03-22 16:40 | 2017-03-31 12:30 | |||
Reporter | mtaal | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | RR17Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 012e6b7ab09c | ||||
Projection | none | ETA | none | Target Version | RR17Q2 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | AugustoMauch | |||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0035601: Transition to offline is not triggered at every location in the MultiServerJSONProcess code | |||||||
Description | There are different ways in which an exception from the call to central is handled in the multi-server-json-process code. In one place a transition to offline is done [1], while in the other [2] this is not done. [1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/553553b86771/src/org/openbravo/mobile/core/servercontroller/MultiServerJSONProcess.java#l390 [^] [2] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/553553b86771/src/org/openbravo/mobile/core/servercontroller/MultiServerJSONProcess.java#l361 [^] | |||||||
Steps To Reproduce | See the code links | |||||||
Proposed Solution | In both locations in the code the same behavior should be done: transition to offline. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0095647) mtaal (viewer) 2017-03-29 14:25 |
Tested this by forcing the code in MultiServerJSONProcess to go into the first if and then throwing an exception: if (true || executeOnlyInCentral(jsonSent)) { final JSONObject jsonToCentral = new JSONObject(jsonSent.toString()); // sent along from the store to central, set the source to STORE jsonToCentral.put(SOURCE_PROP, SOURCE_STORE); // prevent cycling around jsonToCentral.remove(CALL_ONLY_CENTRAL_PROP); JSONObject centralResult = null; try { centralResult = MobileServerRequestExecutor.getInstance().executeCentralRequest( MobileServerUtils.OBWSPATH + this.getClass().getName(), jsonToCentral); if (true) { throw new Exception("TEST"); } } catch (Throwable t) { log.error(t.getMessage(), t); |
(0095648) hgbot (developer) 2017-03-29 14:27 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: 012e6b7ab09cfdfc418a351f098d40560a1ac59f Author: Martin Taal <martin.taal <at> openbravo.com> Date: Wed Mar 29 14:26:56 2017 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/012e6b7ab09cfdfc418a351f098d40560a1ac59f [^] Fixes issue 35601: Transition to offline is not triggered at every location in the MultiServerJSONProcess code In case of only central request then use the same transition to offline code and returning error as in other places in this class. --- M src/org/openbravo/mobile/core/servercontroller/MultiServerJSONProcess.java --- |
(0095708) AugustoMauch (administrator) 2017-03-30 13:29 edited on: 2017-03-30 16:45 |
The code that handlers the flow when there is an exception here [1] and here [2] is duplicated. It would be better if this code is extracted to a function. Also, this line [3] states that the transition to offline will only be done if the node is not transitioning. But the transition to offline should be done if the node is transitioning to online, right? [1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/012e6b7ab09c/src/org/openbravo/mobile/core/servercontroller/MultiServerJSONProcess.java#l361 [^] [2] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/012e6b7ab09c/src/org/openbravo/mobile/core/servercontroller/MultiServerJSONProcess.java#l418 [^] [3] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/012e6b7ab09c/src/org/openbravo/mobile/core/servercontroller/MultiServerJSONProcess.java#l432 [^] |
(0095760) mtaal (viewer) 2017-03-31 12:27 |
As only code needs to copied in a separate method the choice is made to do this in a new issue in the Q3 release. |
(0095762) mtaal (viewer) 2017-03-31 12:28 |
Remaining changes will be done in related issue |
(0095763) AugustoMauch (administrator) 2017-03-31 12:30 |
Code reviewed and verified |
![]() |
|||
Date Modified | Username | Field | Change |
2017-03-22 16:40 | mtaal | New Issue | |
2017-03-22 16:40 | mtaal | Assigned To | => mtaal |
2017-03-22 16:40 | mtaal | OBNetwork customer | => No |
2017-03-22 16:40 | mtaal | Triggers an Emergency Pack | => No |
2017-03-29 14:25 | mtaal | Note Added: 0095647 | |
2017-03-29 14:27 | hgbot | Checkin | |
2017-03-29 14:27 | hgbot | Note Added: 0095648 | |
2017-03-29 14:27 | hgbot | Status | new => resolved |
2017-03-29 14:27 | hgbot | Resolution | open => fixed |
2017-03-29 14:27 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/012e6b7ab09cfdfc418a351f098d40560a1ac59f [^] |
2017-03-29 14:29 | mtaal | Review Assigned To | => AugustoMauch |
2017-03-30 13:29 | AugustoMauch | Note Added: 0095708 | |
2017-03-30 13:30 | AugustoMauch | Status | resolved => new |
2017-03-30 13:30 | AugustoMauch | Resolution | fixed => open |
2017-03-30 13:30 | AugustoMauch | Note Edited: 0095708 | View Revisions |
2017-03-30 13:30 | AugustoMauch | Note Edited: 0095708 | View Revisions |
2017-03-30 16:45 | AugustoMauch | Note Edited: 0095708 | View Revisions |
2017-03-31 12:27 | mtaal | Note Added: 0095760 | |
2017-03-31 12:28 | mtaal | Status | new => scheduled |
2017-03-31 12:28 | mtaal | Note Added: 0095762 | |
2017-03-31 12:28 | mtaal | Status | scheduled => resolved |
2017-03-31 12:28 | mtaal | Fixed in Version | => RR17Q2 |
2017-03-31 12:28 | mtaal | Resolution | open => fixed |
2017-03-31 12:29 | mtaal | Relationship added | related to 0035667 |
2017-03-31 12:30 | AugustoMauch | Note Added: 0095763 | |
2017-03-31 12:30 | AugustoMauch | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |