Offline Mode » History » Revision 2
Revision 1 (Henning Blohm, 17.07.2016 21:28) → Revision 2/6 (Henning Blohm, 17.07.2016 21:52)
h1. Offline Mode
The purpose of the offline mode is to avoid long synchronisation times when developing in a situation poor network connectivity. The expected behavior is that of having no network connectivity at all - without imposing this on other applications.
The offline mode can be turned on and off via a system property and interactively on the GUI.
h2. Design
* Component Repository use @AbstractRepository.checkOffline()@ whenever a connection is normally required.
The method looks essentially like this:
<pre><code class="java">
protected void checkOfflineMode() {
if (Foundation.isOffline()) {
throw new IllegalStateException("Running offline");
}
}
</code></pre>
where @Foundation.isOffline()* checks for the boolean String value of the system property *com.zfabrik.offline*.
* Changing the system property can happen any time
* The system property status is reflected in a JMX MBean attribute of TBD. We use the internal JMX implementation to broadcast attribute changes to all worker processes.