Wednesday, February 22, 2012

ADF application running on clustered environment - High Availability

In order for an ADF application to support High Availability in clustered environment with server fail over. The below steps must be followed in developing an ADF application.
  • All Manage Beans must implement Serializable.
  • UI component bindings must be declared in a bean with shorter scope (backing bean scope or request scope).
  • If it needs to be declared in Manage Bean with PageFlowScope (Not recommended), please ensure you declare the binding as transient.
  • Any objects that are declared as an attribute in Manage Bean must be Serialized.
The following files must be modified to make an ADF application High Available in clustered environment.

adf-config.xml


<adf-controller-config xmlns="http://xmlns.oracle.com/adf/controller/config">
     <adf-scope-ha-support>true</adf-scope-ha-support>
</adf-controller-config>

weblogic.xml


<session-descriptor>
      <persistent-store-type>replicated_if_clustered</persistent-store-type>
</session-descriptor>

For testing, please add the below parameter in your weblogic domain 
setDomainEnv.cmd
-Dorg.apache.myfaces.trinidad.CHECK_STATE_SERIALIZATION=all

Run each use case in UI application. Verify that you don’t see below highlighted errors in Domain console log.

[2012-02-22T13:29:25.383-06:00] [manageserver1] [ERROR] [] [oracle.adfinternal.controller.state.SessionBasedScopeMap] 
java.io.NotSerializableException: com.ram.mytest.manage.TestMB


2 comments:

  1. Could you please explain how to 'declare binding as transient' with an example? Thanks.

    ReplyDelete