Tuesday, 6 October 2015

High Available (HA) checklist for ADF applications

Making ADF application HA enabled, there are two groups of actions that should be performed. One is the configuration and the second is the development part of work. Below you'll find my checklist:
  1. in adf-config.xml descriptor put code <adf-scope-ha-support>true</adf-scope-ha-support>
  2. in weblogic.xml descriptor set session persistent store type as REPLICATED_IF_CLUSTERED
  3. each application module must have jbo.dofailover attribute set to true
  4. if you're using POJO DataControls, you need to implement three methods there: createSnapshot(), restoreSnapshot(Serializable handle) and removeSnapshot(Serializable handle); more about that here: Creating and Configuring Bean Data Controls
  5. each bean defined in the memory scope higher than request level must implement java.io.Serializable interface
    • avoid using java transient keyword regarding to the bean attributes
    • each attribute that extends UIComponent aren't serializable! if UI component must be binded with the code, use org.apache.myfaces.trinidad.util.ComponentReference wrapper there
    • make the framework aware of changes that needs to be replicated against the cluster, mark the scope as dirty, ie. using ControllerContext.getInstance().markScopeDirty(AdfFacesContext.getCurrentInstance().getViewScope());
  6. each page flow and session attributes must implement java.io.Serializable interface
 As short as possible. Hope it'll be helpful :)