Troubleshooting Oracle ADF Development Issues

Configuring High Availability for Oracle ADF and WebCenter Applications 6-11 To enable ADF Controller to track changes to ADF memory scopes and replicate the page flow scope and view scope within the server cluster, you must set the ADF Controller parameter adf-scope-ha-support in the application’s adf-config.xml file to true. For example, when set to true for an application and that application adds or removes a bean from a page flow scope during a request, the change will automatically replicated within a cluster. The adf-config.xml file is the central configuration file for all ADF components. The file contains sections to configure the runtime behavior for ADF components, including, ADF Controller. To configure the adf-config.xml file for high availability: 1. Launch JDeveloper and open the application.

2. In the Application Navigator, expand the Application Resources.

3. Select Descriptors, and then select the ADF META-INF node.

4. Double-click the adf-config.xml file, and click the Source tab to edit the file.

5. Add the following to the file: adf-controller-config xmlns=http:xmlns.oracle.comadfcontrollerconfig adf-scope-ha-supporttrueadf-scope-ha-support adf-controller-config For more information about using the adf-config.xml file to configure ADF, see the chapter on creating complex task flows in the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework.

6.1.3.4 Configuring org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION

The org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION parameter must not be set to true when running in a high availability environment. Setting this context parameter to true can lead to errors after failover occurs.

6.1.4 Troubleshooting Oracle ADF High Availability

This section describes procedures for troubleshooting possible issues with Oracle ADF.

6.1.4.1 Troubleshooting Oracle ADF Development Issues

When you develop the Fusion web application in Oracle JDeveloper, the integrated development environment provides support for detecting potential High Availability issues. The warnings that JDeveloper provides are generated by the audit framework and will be triggered to display in the JDeveloper source editors. The warnings the editors display are based on the audit rules for High Availability applications. The High Availability audit rules that JDeveloper enables by default are: ■ ADF Controller Configuration - High Availability for ADF Scopes is not Enabled simply warns the developer that the adf-scope-ha-support flag in the adf-config.xml file is set is not set to true. This audit rule fires only when the adf-controller-config element is present the ADF application-level configuration file adf-config.xml. ■ ADF Page Flows - Bean in Scope Map is Modified warns the developer when the some code calls a setter method on a bean to indicate that the code did not subsequently call the ControllerContext.markScopeDirty method. This audit rule fire only when the adf-scope-ha-support flag in the adf-config.xml file is set to true. 6-12 Oracle Fusion Middleware High Availability Guide ■ ADF Page Flows - EL Bean is Modified warns the developer when some code evaluates an EL expression that mutates a bean to indicate that the code did not subsequently call the ControllerContext.markScopeDirty method. This audit rule fire only when the adf-scope-ha-support flag in the adf-config.xml file is set to true. ■ ADF Page Flows - Managed Bean Class Not Serializable warns the developer that a managed bean has a non-serializable class defined in viewScope, pageFlowScope, or sessionScope. This audit rule fire only when the adf-scope-ha-support flag in the adf-config.xml file is set to true. You can modify the High Availability audit rule settings using the Preference dialog in JDeveloper. From the JDeveloper toolbar, choose Tools - Preferences, under Audit - Profiles expand ADF Controller Configuration or ADF Pages Flows and make the desired audit rule selections. You can also trigger the audit by choosing Build - Audit project.jpr from the JDeveloper toolbar.

6.1.4.2 Troubleshooting Oracle ADF Deployment Issues