Running Oracle ADF application on High availability (HA) architecture

Oracle ADF is used to build large enterprise application. And if you want to have your application to run on high availabilty then you should understand what is High Availability (HA) .

What is High Availability –
High availability refers to the ability of users to access a system without loss of service. Deploying a high availability system minimizes the time when the system is down, or unavailable and maximizes the time when it is running, or available. This section provides an overview of high availability from a problem-solution perspective. With HA , even for new deployment you will never have down time.

Normally in large enterprise application , you don’t want your system to be down..Application deployed in cluster environment. If one of the server down then the user session should replicate to another cluster . Now , we have Oracle HTTP Server (OHS) or Apache plugin is to used to get single URL and manage internally to replicate the session and send request if one of cluster is fail.

How a web server handle request

webserver

Cluster- Group of managed server running to provide scalability and reliability. In this multiple wls instance simultaneously and working together.Cluster is part of WLS domain . A domain can have multiple cluster

Cluster


Architecture of Weblogic HA

apache web server

Now the important point for developer – Few points designing and developing Oracle ADF application for HA.
There are 6 types of memory scopes. Read more on ADF memory scopes

When the Fusion web application runs in a clustered environment, a portion of the application’s state is serialized and copied to another server or a data store at the end of each request so that the state is available to other servers in the cluster.If it not serialized then user will lose data upon fail-over.

WebLogic duplicates those sessions by serializing the objects in the session and than transfers it to the secondary machine. Only the object that are stored in the session will be replicated. From an ADF perspective this means that managed bean with pageFlowScope and above will be replicated.It is very well defined in Oracle documentation and A-team article.

Configuring Oracle ADF development for High Availability

=> Changes in Application server-

While doing development Jdeveloper integrated server will not throw any errors by default. Add this parameter in server has to be run with the following JVM parameter:

-Dorg.apache.myfaces.trinidad.CHECK_STATE_SERIALIZATION=all
 

Note that this check is disabled by default to reduce runtime overhead. Do not use this after your testing is complete.

-> Changes in ADF code

-> Please make sure that managed beans used in ADF application with a scope greater than one request should be serializable ( implement the java.io.Serializable interface). Specifically, beans stored in session scope, page flow scope, and view scope need to be serializable.

– All pageflowscope and viewscope managed beans should not contain UI bindings. In essence, component bindings should live for a http request (request scope or backingBean scope). Any state or data you need for a longer duration can be saved in a pageflowscope bean separately.

– Make sure Oracle ADF is aware of changes to managed beans stored in ADF scopes (view scope and page flow scope) and enable the tracking of changes to ADF memory scopes.

use below code to notify ADF

controllerContext ctx = ControllerContext.getInstance();
ctx.markScopeDirty(viewScope);

 


-> Configuring Application Modules

– Right-click the application module and select Configurations.Click Edit.Click the Pooling and Scalability tab.
Select the Failover Transaction State Upon Managed Release checkbox.

<AppModuleConfig ...
 <AM-Pooling jbo.dofailover="true"/>
</AppModuleConfig>
 

-> Configuring weblogic.xml

In weblogic.xml file, add entry as below persistent-store-type definition to the session-descriptor element like below

<weblogic-web-app>
    <session-descriptor>
    <persistent-store-type>
    replicated_if_clustered
    </persistent-store-type>
    </session-descriptor>
</weblogic-web-app>

 

-> Configuring adf-config.xml

In adf-config.xml file, add entry as like below

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

 

Happy Learning with Vinay In techartifact.

Ref- http://docs.oracle.com/cd/E12839_01/core.1111/e10106/adf.htm

Jdeveloper 11.1.1.7 bug with AdfKeyStroke.ENTER_KEY in IE and Mozilla

Hi All,

If you are facing an error of JS like and you are handling enter key using AdfKeyStroke.ENTER_KEY

Mozilla Firefox

NS_ERROR_ILLEGAL_VALUE:
…eoutWarningTimer=null;if(this._timeoutTimer)this.cancelTimer(this._timeoutTimer)…

IE

Message: ‘undefined’ is null or not an object

Don’t be afraid, its not your fault. It is happening in jdeveloper 11.1.1.7 .
Cause- Might be when we use AdfKeyStroke.ENTER_KEY, it generates some internal JS event by framework, which can cause this issue.

In all other version , it is working fine.So if you upgrade your application to Jdeveloper 11.1.1.7
and you got this error, Raise an SR to Oracle.There is already bug raise by Oracle . Bug # 19137193

Till the next post, happy coding….

Highlight of Jdeveloper 12.1.3 features- New version released

Yesterday , its an release of Fusion Middleware 12.1.3. The focus is mainly on SOA Suite 12c and WebLogic 12.1.3.For interesting point of Jdeveloper 12.1.3 .

Main Features –

Enhanced Maven Support
-> New ADF “oracle-adffaces-ejb” archetype introduced to enable creating a basic ADF application using ADF Faces and EJB from Maven.
-> JDeveloper now supports creating a project from an archetype which takes parameters

New DVT components

-> Chart solutions

chartzoomandscroll-2226882

-> New Gauges

newgauges2-2226904

->Thematic Map has a number of new features, including: Area layer styling and marker zoom behavior: Its same features which is like google analytics

globalgdpsmall-2226900

-> Component for define movement

http://www.oracle.com/technetwork/developer-tools/jdev/flighttracker-2226895.gif

->isolatedareatmap-2226901

-> Show custom map

floorplan1-2226897

-> New Component: Diagram can be used to visualize different sets of data by displaying nodes and relationships between them.

diagramarclayoutsmall-2226894

diagram-2226891

->My Favorite features

-> af:deck component – New container component that shows one child component at a time and allows the transition between children to be animated (ie. fade, slide in).

Untitled

rr

-> It bring new page template for tablet

-> Supporting of media tag in ADF Skinning – Awesome feature of adding of css tag. ADF skinning framework now supports client side rules such as @charset, @document, @font-face, @import, @keyframes, @media, @page, @supports. These agents can be used to achieve responsive design and to allow use of more modern techniques for graphics such as icon fonts. Now we can create real responsvie web design in ADF with this feature

-> Support on working ADF application on Internet Explorer 11 .

ADF Controller
Recursive bounded task flows Support for calling bounded task flows recursively. In previous versions, the view layer did not detect that the view activity had occurred and did not re-render the region.

Read more about these features in details

http://docs.oracle.com/middleware/1213/adf/index.html
Read more about API in documentation

Happy learning with Vinay in techartifact….