Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0036044 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
design defect | [Retail Modules] StoreServer | major | have not tried | 2017-05-18 18:23 | 2017-06-16 17:36 | |||
Reporter | AugustoMauch | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | RR17Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 746e879cffee | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | mtaal | |||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0036044: Logical duplication in the MobileServerTransitionToOnlineHandler and CheckServerOfflineHandler classes | |||||||
Description | The purpose of the CheckServerOfflineHandler and MobileServerTransitionToOnlineHandler classes is very similar: - CheckServerOfflineHandler is used by the ServerStateBackground process to know if a server must go offline - MobileServerTransitionToOnlineHandler is used by the MobileServerController.TransitionToOnline to know if a server can go online In most cases, maybe in all, if for some reason a server must go offline, for that same reason the server cannot go online. It would be better if we could remove the duplication in logic that there in these two classes. | |||||||
Steps To Reproduce | - | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0096688) mtaal (viewer) 2017-05-21 21:24 |
The two mentioned classes have different purposes: - CheckServerOfflineHandler: is called to determine if transition to online can be done - MobileServerTransitionToOnlineHandler: are called when transition to online is possible because servers are reachable. Is used to execute integrations/transactions during transition. So the purpose of these classes is different, one is called to determine if transition to online can be done, the other is called to execute transition to online. Having said this it makes sense to again check the CheckServerOfflineHandler instances during transition to online to be sure that transition to online is possible/valid. http://wiki.openbravo.com/wiki/How_to_implement_custom_offline_checking [^] http://wiki.openbravo.com/wiki/How_to_Write_Online_Transition_Handlers [^] |
(0096715) mtaal (viewer) 2017-05-22 15:46 |
To test the changes you can add this code somewhere to force offline: public static class LocalOfflineChecker extends CheckServerOfflineHandler { @Override public boolean isServerOffline() { return true; } } public static class LocalTransitionToOnlineHandler extends MobileServerTransitionToOnlineHandler { @Override public void processTransactions() { // do it } @Override public boolean isReadyToGoOnline() { return false; } @Override public String getOfflineLog() { return super.getOfflineLog(); } } |
(0097218) hgbot (developer) 2017-06-08 13:44 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: 746e879cffeed5352f18f39ffeefcd9830f9d209 Author: Martin Taal <martin.taal <at> openbravo.com> Date: Thu Jun 08 13:43:54 2017 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/746e879cffeed5352f18f39ffeefcd9830f9d209 [^] Fixes issue 36044: Logical duplication in the MobileServerTransitionToOnlineHandler and CheckServerOfflineHandler classes Also use the offline handlers in the transition to online code --- M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java --- |
(0097407) AugustoMauch (administrator) 2017-06-15 09:53 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: 5ce6e74e79f7a0fe97dc2c4e1de46ebb9601f92c Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Wed Jun 14 18:24:47 2017 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/5ce6e74e79f7a0fe97dc2c4e1de46ebb9601f92c [^] [^] Related with issue 36044: Fixes type and reverts number of retries to 10 --- M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java --- |
(0097454) mtaal (viewer) 2017-06-16 17:36 |
Reviewed |
![]() |
|||
Date Modified | Username | Field | Change |
2017-05-18 18:23 | AugustoMauch | New Issue | |
2017-05-18 18:23 | AugustoMauch | Assigned To | => StoreServer |
2017-05-18 18:23 | AugustoMauch | OBNetwork customer | => No |
2017-05-18 18:23 | AugustoMauch | Triggers an Emergency Pack | => No |
2017-05-18 18:23 | AugustoMauch | Assigned To | StoreServer => mtaal |
2017-05-21 21:24 | mtaal | Note Added: 0096688 | |
2017-05-22 15:46 | mtaal | Note Added: 0096715 | |
2017-06-08 10:15 | mtaal | Review Assigned To | => AugustoMauch |
2017-06-08 13:44 | hgbot | Checkin | |
2017-06-08 13:44 | hgbot | Note Added: 0097218 | |
2017-06-08 13:44 | hgbot | Status | new => resolved |
2017-06-08 13:44 | hgbot | Resolution | open => fixed |
2017-06-08 13:44 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/746e879cffeed5352f18f39ffeefcd9830f9d209 [^] |
2017-06-14 18:31 | AugustoMauch | Review Assigned To | AugustoMauch => mtaal |
2017-06-15 09:53 | AugustoMauch | Note Added: 0097407 | |
2017-06-16 17:36 | mtaal | Note Added: 0097454 | |
2017-06-16 17:36 | mtaal | Status | resolved => closed |
2017-06-16 17:36 | mtaal | Fixed in Version | => RR17Q3 |
Copyright © 2000 - 2009 MantisBT Group |