Interface FailoverManager


  • public interface FailoverManager
    Represents a class that is able to handle fail-over in the application specific way.

    Desktops, pages and components are serializables, so you can use the clustering feature supported by the Web server without implementing this interface. In other words, you need to implement this interface only if you want to provide an application-specific way to re-create back.

    If you want to use the Web server's clustering feature, what you need to do is to specify SerializableUiFactory as the UI factory in zk.xml as follows (and forget FailoverManager).

    
    <system-config>
     <ui-factory-class>org.zkoss.zk.ui.http.SerializableUiFactory</ui-factory-class>
    </system-config>
    

    The recovery involves two phases:

    1. isRecoverable(org.zkoss.zk.ui.Session, java.lang.String): It tests whether the desktop is recoverable.
    2. recover(org.zkoss.zk.ui.Session, org.zkoss.zk.ui.Execution, org.zkoss.zk.ui.Desktop): If recoverable, ZK will create the desktop accordingly, prepare the execution and then invoke this method to do real recovery.
    Author:
    tomyeh