Friday, 15 January 2016

ADF Architecture

Highlevel concepts of ADF projects - Design, Architecture, development best practices, testing and maintenance of the ADF applications.

  • Team Size & Roles
    • Database Developers
    • Java expert
    • Java EE expert
    • JSF expert
  • Design Roles
    • Enterprise architects
    • System architects
    • Database architects
    • FMW skilled architects
    • Web designers
    • User experience advocates

Error Handling

Oracle ADF has 4 layers and exception can occur any where
  Business Service -> TaskFlow Layer -> View Layer -> Browser

Every exception that is not handled, will go to the browser. It will take users out of working context.

Whole idea of proper exception/error handling is, catch the exception as close to the source as possible, so that user can stay in the working context. 

ADF Exception Handlers
  • ADFm exception handler
    • Error Handler (DCErrorHandler) in BindingContext
  • ADFc Exception handler
    • Exception Handler activity in Task Flow
    • Application wide exception handler
  • ADFv Exception Handler
    • oracle.adf.view.rich.context.ExceptionHandler
  • Container, error-page in web.xml


  • Binding Context is available after Restore View step.
  • Process Validation will contact binding layer when af:validator tag is added to the components. and is pointing to binding layer - for required field, length validation. 
  • Update Model - Changes in Model / binding layer are passed to Business Service to update View and Entity Object. 
  • Invoke Action - To execute a query, to commit/rollback, to execute method you expose on Business Service. 
  • Render Response - To refresh iterators, 
Super class for all Exceptions
  • oracle.jbo.JboException - One Exception super class for All Exception.
  • JboException extends java.lang.RuntimeException
    • Thus BusinessComponent method can throw exceptions without a throws clause in the method signature
  • Translation of error messages occur by client calling getLocalizedMessage() and not when error is thrown.

  •  Exceptions that are not handled in the business service propagate to  the ADF Model layer(Binding Layer)


DataBindings.cpx   is available in all of the view layer projects and its sub projects. Responsibility of this file is to act as mapping of an incoming request for view and find associated Binding Container the page defines.
  • In addition, it has name for the data control being used in the context of view controller project, so that, when you look at page def file there is no direct relation between the page def and data control. But indirect relation going thru DataBindings.cpx file, so that, if we need to change data control, just change the DataControl.cpx file. 

Typical View Layer Exception Handling
  • Failed execution of client logic in managed beans
  • Failed access to the ADF Binding layer
    • EL reference in page source
    • java references in managed beans
  • Failed EL expressions
    • Typos in object name
    • Missing Objects (e.g. entity object references)
    • Failed Type Casting (e.g. oracle.jbo.domain.Number to Long)
  • Expired Session