Monday, 25 May 2009

ADF11g fail over within a Weblogic 10.3 Cluster

I recently setup failover for a simple ADF11g application within a Oracle weblogic 10.3 cluster. Once you have your Oracle Weblogic 10.3 cluster in place you really only need to do 2 things on your application side.

Part A

1. Right click on your application module and select "Configurations".
2. Select your config and press the "Edit" button.
3. Click on "Pooling and Scalability" tab.
4. Select the check box "Failover Transaction State Upon Managed Release".
5. Press OK

This will generate the following for your bc4j.xcfg file in your model project with fail over feature switched on.

<AppModuleConfig DeployPlatform="LOCAL"
<AM-Pooling jbo.dofailover="true"/>
<Security AppModuleJndiName="model.AppModule"/>

This provides the most pessimistic protection against application server failure. The application module instances' state is always saved and may be activated by any application module instance at any time. Of course, this capability comes at expense of the additional overhead of eager passivation on each request.

For more information on state management see the following link:

Part B

Now finally we need to ensure our view project which is packaged as a WAR file includes a weblogic.xml file within the WEB-INF folder as follows. This will ensure we setup our application to use HTTP Session replication in the event of a node failure.

<?xml version = '1.0' encoding = 'windows-1252'?>

While testing this I used the following managed server property to determine which
managed server I was accessing at the time.

String instance = System.getProperty("weblogic.Name");

No comments: