Monday, March 23, 2015

Lifecycle of a Web Page Request Using Oracle ADF and JSF

Ans : Below figure  shows a sequence diagram of the lifecycle of a web page request using JSF and Oracle ADF in tandem.

Lifecycle of a Web Page Request Using JSF and Oracle ADF
Life Cycle of ADF
As shown in the figure, the basic flow of processing happens as follows:
A web request for http://yourserver/yourapp/faces/some.jsp arrives from the client to the application server
The ADFBindingFilter finds the ADF binding context in the HTTP session, and if not yet present, initializes it for the first time.
During binding context initialization, the ADFBindingFilter:
Consults the servlet context initialization parameter named CpxFileName and appends the *.cpx file extension to its value to determine the name of the binding context metadata file. By default the parameter value will be “DataBindings“, so it will look for a file named DataBindings.cpx.
Reads the binding context metadata file to discover the data control definitions, the page definition file names used to instantiate binding containers at runtime, and the page map that relates a JSP page to its page definition file.
Constructs an instance of each Data Control, and a reference to each BindingContainer. The contents of each binding container are loaded lazily the first time they are used by a page.
The ADFBindingFilter invokes the beginRequest() method on each data control participating in the request. This gives every data control a notification at the start of every request where they can perform any necessary setup.
An application module data control uses the beginRequest notification to acquire an instance of the application module from the application module pool.
The JSF Lifecycle class, which is responsible for orchestrating the standard processing phases of each request, notifies the ADFPhaseListener class during each phase of the lifecycle so that it can perform custom processing to coordinate the JSF lifecycle with the Oracle ADF Model data binding layer.
Note:The FacesServlet (in javax.faces.webapp) is configured in the web.xml file of a JSF application and is responsible for initially creating the JSF Lifecycle class (in javax.faces.lifecycle) to handle each request. However, since it is the Lifecycle class that does all the interesting work, the FacesServlet is not shown in the diagram.
The ADFPhaseListener creates an ADF PageLifecycle object to handle each request and delegates appropriate before/after phase methods to corresponding methods in the ADF PageLifecycle class as shown in  If the appropriate binding container for the page has never been used before during the user’s session, it is created.

What is Oracle Adf?

Ans :
The Oracle Application Development Framework (Oracle ADF) is an end-to-end application framework that builds on J2EE standards and open-source technologies to simplify and accelerate implementing service-oriented applications. If you develop enterprise solutions that search, display, create, modify, and validate data using web,wireless, desktop, or web services interfaces, Oracle ADF can simplify your job. Used
in tandem, Oracle JDeveloper 10g and Oracle ADF give you an environment that covers the full development lifecycle from design to deployment, with drag-and-drop data binding, visual UI design, and team development features built-in.