ADF Mythbusters 
Andrejus Baranovskis 
Florin Marcus
Company Profile 
ADF, ADF Mobile, BPM, SOA, WebCenter 
Small Team of Experts, Focused on Technical Quality Results 
Customers – Global Corporations, Medium and Small Business 
Oracle Technical Blog – 8 Years (~700 posts) 
Oracle Fusion Middleware Innovation Award 2010, SOA 
Partner Community Award for Outstanding Contribution 
Across the Globe 2010
Agenda 
Batches Of 
AM Pools and DB Connections Pools 
Activation-Safe Application Modules 
Maximum Number of Regions Per Page 
JSP vs Facelets
“Batches Of” 
Oracle Service Request: 3-9978776141 
Performance and Memory Impact
“Batches Of”: How It Works
“Batches Of”: How It Works 
Batches of 1 - a network round trip for each record
“Batches Of”: How It Works 
Batches of 5 - a network round trip for every 5 records
“Batches Of”: What Docs Say 
9.2.4.2 Consider Whether Fetching One Row at a Time is Appropriate 
[...] By default, the framework will fetch rows in batches of one row at a time. If 
you are fetching any more than one row, you will gain efficiency by setting 
this in Batches of value. 
However the higher the number, the larger the client-side buffer required, so 
avoid setting this number arbitrarily high. If you are displaying results n rows at 
a time in the user interface, it's good to set the fetch size to at least n+1 so 
that each page of results can be retrieved in a single round trip to the 
database. 
Developing Fusion Web Applications with Oracle Application Development Framework
“Batches Of”: Methodology 
Target 
Scope 
Tools 
4 ADF applications in production for more than 6 
months. 
Typical use cases: multiple queries per page, 
returning less than 100 records each. Fetching 
millions of records over JDBC is out of scope. 
JMeter, Oracle Application Testing Suite, 
JRockit, Java Mission Control, Weblogic 
Console, Spy Servlet, 
Redsamurai Performance Audit.
Batches Of: Test Results 
No relevant impact when: 
Less than 15 active user sessions 
and 
“Connection Delay Time” is 
lower than 150 ms.
Batches Of: Response Time 
Response time with 100 user sessions
Batches Of: Memory Consumption 
ADF 11g 
One user browsing the application
Batches Of: Memory Consumption 
ADF 11g 
ADF 12c 
One user browsing the application
Batches Of: Conclusions 
ADF 11g: 
ADF 12c: 
Huge impact over memory size due to OJDBC 
Driver 11g design, intentionally trading memory 
for performance. 
Memory impact is significantly lower because 
new version of OJDBC Driver is less memory 
hungry. 
ADF 12c scales better!
Batches Of: Conclusions 
Performance improvement are significant when values are 
between 10 - 40. 
Oracle JDBC Dev Team suggests the “Batches Of” (Fetch 
Size) to be less than 100. 
Retrieving all records in a single round trip doesn’t 
necessarily improve performance.
AM Pools 
DB Pools 
The Great Schism 
Oracle Service Request: 3-9979146351
AM or DB Pools: The Tickbox
AM or DB Pools: The Options 
Begin Request Process Request Send Response 
jbo.doconnectionpooling=false (Default)
AM or DB Pools: The Options 
Begin Request Process Request Send Response 
jbo.doconnectionpooling=true
“AM or DB Pools”: What Docs Say 
51.2.6 What You May Need to Know About How Database 
and Application Module Pools Cooperate 
Performance Tip: 
Leave the “jbo.doconnectionpooling” configuration 
parameter set to “false” for best performance without 
sacrificing scalability and reliability. 
Developing Fusion Web Applications with Oracle Application Development Framework
AM or DB Pools: Memory 
char[] and byte[] (%) in ADF 11g
AM or DB Pools: Memory 
char[] and byte[] (%) in ADF 12c
AM or DB Pools: What we say 
jbo.doconnectionpooling=false used to be best practice with 
Oracle JDBC Drivers versions 8i or 9i, designed for minimal 
memory use. 
Driver’s performance improved by an average of 30% on 10i 
version, by storing queried data into buffer (char[] and byte[]) arrays. 
These buffers consume large amounts of memory that gets freed 
only when statements are closed. 
Holding statements open in ADF BC is no longer necessary since 
“Statement Caching” was introduced at Datasource level.
AM vs DB Pools: What we say 
jbo.doconnectionpooling=false brings scalability 
problems with ADF 11g, but improves on ADF 12c 
jbo.doconnectionpooling=true is the way OJDBC was 
designed to be used on latest versions. 
jbo.doconnectionpooling=false should be either dropped 
or re-architected (javax.sql.rowset.CachedRowSet )
Activation-Safe AMs 
Oracle Service Request: SR 3-9979203251 
The trouble with high loads
“Activation-Safe”: What Docs Say 
50.10 Testing to Ensure Your Application Module is 
Activation-Safe 
“If you have not explicitly tested that your application module 
functions when its pending state gets activated from a 
passivation snapshot, then you may encounter an unpleasant 
surprise in your production environment when heavy system 
load tests this aspect of your system for the first time.” 
Developing Fusion Web Applications with Oracle Application Development Framework
“Activation-Safe”: What we say 
Few ADF teams are doing activation-safe testing from 
project start. 
Fixing already built ADF applications is expensive and 
sometimes impossible to fix without significant refactoring.
“Activation-Safe”: What we say 
If max number of users is previously known, the application 
module pool can be configured to suppress recycling. 
Recycling application modules with the purpose of saving 
memory is wrong idea of scalability. 
Activation-safety is mandatory for ADF systems running in 
Failover Cluster environments, otherwise it may be ignored.
Maximum Number 
of Regions 
Code vs performance 
Oracle Service Request: 3-9979119591
Max No of Regions: What Docs Say 
8.3.6 ADFc: Region Usage 
“Adding regions to a page can be a powerful addition to the 
application. However, regions can be a resource-intensive 
component on the page. For better performance, consider using 
regions only when the specific functionality is required.” 
Fusion Middleware Performance and 
Tuning Guide 11 g 
“10 is the maximum amount of regions that you should have on a 
single page just for good performance.” 
ADF Architecture TV -Performance and Tuning - Controller and View Layer
Max No of Regions: Methodology 
Goal Refactoring a complex page with a hierarchy of 25 
regions to a page with a single region, preserving 
the UI Component layout. 
We made sure the data was previously queried 
and cached before page load, so database hit 
would not affect the measurements.
Max No of Regions: Response Time
Max No of Regions: Conclusions 
Subsequent testing while refactoring from 25 regions to 1 region didn’t 
show any significant improvement below 10 regions use. The 
improvement was minimal and increased constantly while number of 
regions decreased. 
Response time overhead when using 25 regions was 100 ms. 
This is less than 2% of the response time, when querying is included. 
Production ADF applications handle thousands of users with 40 regions 
on the landing page.
JSP vs Facelets 
Is conversion to Facelets necessary?
JSP vs Facelets: What Docs say 
“Unlike JSP documents, which are compiled into an 
intermediate Servlet at runtime, Facelets don’t impose this 
unnecessary overhead and build the JSF component tree 
directly. 
This leads to far better performance in the component tree 
creation and page rendering processes.” 
JavaServer Faces 2.0 Overview and Adoption Roadmap in Oracle ADF Faces
JSP vs Facelets: Methodology 
Goal 
Tools 
Migrating a 12c application from jsp to facelets. 
Oracle Application Testing Suite, DMS Spy 
Servlet
JSP vs Facelets: Response Time 
Faster initialization of facelets
References 
http://docs.oracle.com/middleware/1213/adf/develop/index.html 
http://www.oracle.com/technetwork/database/application-development/jdbc-memory-management- 
12c-1964666.pdf 
https://www.youtube.com/watch?v=FO1soDjSpO4 
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adffaces-jsf20-190927.pdf

ADF Mythbusters UKOUG'14

  • 1.
    ADF Mythbusters AndrejusBaranovskis Florin Marcus
  • 2.
    Company Profile ADF,ADF Mobile, BPM, SOA, WebCenter Small Team of Experts, Focused on Technical Quality Results Customers – Global Corporations, Medium and Small Business Oracle Technical Blog – 8 Years (~700 posts) Oracle Fusion Middleware Innovation Award 2010, SOA Partner Community Award for Outstanding Contribution Across the Globe 2010
  • 3.
    Agenda Batches Of AM Pools and DB Connections Pools Activation-Safe Application Modules Maximum Number of Regions Per Page JSP vs Facelets
  • 4.
    “Batches Of” OracleService Request: 3-9978776141 Performance and Memory Impact
  • 5.
  • 6.
    “Batches Of”: HowIt Works Batches of 1 - a network round trip for each record
  • 7.
    “Batches Of”: HowIt Works Batches of 5 - a network round trip for every 5 records
  • 8.
    “Batches Of”: WhatDocs Say 9.2.4.2 Consider Whether Fetching One Row at a Time is Appropriate [...] By default, the framework will fetch rows in batches of one row at a time. If you are fetching any more than one row, you will gain efficiency by setting this in Batches of value. However the higher the number, the larger the client-side buffer required, so avoid setting this number arbitrarily high. If you are displaying results n rows at a time in the user interface, it's good to set the fetch size to at least n+1 so that each page of results can be retrieved in a single round trip to the database. Developing Fusion Web Applications with Oracle Application Development Framework
  • 9.
    “Batches Of”: Methodology Target Scope Tools 4 ADF applications in production for more than 6 months. Typical use cases: multiple queries per page, returning less than 100 records each. Fetching millions of records over JDBC is out of scope. JMeter, Oracle Application Testing Suite, JRockit, Java Mission Control, Weblogic Console, Spy Servlet, Redsamurai Performance Audit.
  • 10.
    Batches Of: TestResults No relevant impact when: Less than 15 active user sessions and “Connection Delay Time” is lower than 150 ms.
  • 11.
    Batches Of: ResponseTime Response time with 100 user sessions
  • 12.
    Batches Of: MemoryConsumption ADF 11g One user browsing the application
  • 13.
    Batches Of: MemoryConsumption ADF 11g ADF 12c One user browsing the application
  • 14.
    Batches Of: Conclusions ADF 11g: ADF 12c: Huge impact over memory size due to OJDBC Driver 11g design, intentionally trading memory for performance. Memory impact is significantly lower because new version of OJDBC Driver is less memory hungry. ADF 12c scales better!
  • 15.
    Batches Of: Conclusions Performance improvement are significant when values are between 10 - 40. Oracle JDBC Dev Team suggests the “Batches Of” (Fetch Size) to be less than 100. Retrieving all records in a single round trip doesn’t necessarily improve performance.
  • 16.
    AM Pools DBPools The Great Schism Oracle Service Request: 3-9979146351
  • 17.
    AM or DBPools: The Tickbox
  • 18.
    AM or DBPools: The Options Begin Request Process Request Send Response jbo.doconnectionpooling=false (Default)
  • 19.
    AM or DBPools: The Options Begin Request Process Request Send Response jbo.doconnectionpooling=true
  • 20.
    “AM or DBPools”: What Docs Say 51.2.6 What You May Need to Know About How Database and Application Module Pools Cooperate Performance Tip: Leave the “jbo.doconnectionpooling” configuration parameter set to “false” for best performance without sacrificing scalability and reliability. Developing Fusion Web Applications with Oracle Application Development Framework
  • 21.
    AM or DBPools: Memory char[] and byte[] (%) in ADF 11g
  • 22.
    AM or DBPools: Memory char[] and byte[] (%) in ADF 12c
  • 23.
    AM or DBPools: What we say jbo.doconnectionpooling=false used to be best practice with Oracle JDBC Drivers versions 8i or 9i, designed for minimal memory use. Driver’s performance improved by an average of 30% on 10i version, by storing queried data into buffer (char[] and byte[]) arrays. These buffers consume large amounts of memory that gets freed only when statements are closed. Holding statements open in ADF BC is no longer necessary since “Statement Caching” was introduced at Datasource level.
  • 24.
    AM vs DBPools: What we say jbo.doconnectionpooling=false brings scalability problems with ADF 11g, but improves on ADF 12c jbo.doconnectionpooling=true is the way OJDBC was designed to be used on latest versions. jbo.doconnectionpooling=false should be either dropped or re-architected (javax.sql.rowset.CachedRowSet )
  • 25.
    Activation-Safe AMs OracleService Request: SR 3-9979203251 The trouble with high loads
  • 26.
    “Activation-Safe”: What DocsSay 50.10 Testing to Ensure Your Application Module is Activation-Safe “If you have not explicitly tested that your application module functions when its pending state gets activated from a passivation snapshot, then you may encounter an unpleasant surprise in your production environment when heavy system load tests this aspect of your system for the first time.” Developing Fusion Web Applications with Oracle Application Development Framework
  • 27.
    “Activation-Safe”: What wesay Few ADF teams are doing activation-safe testing from project start. Fixing already built ADF applications is expensive and sometimes impossible to fix without significant refactoring.
  • 28.
    “Activation-Safe”: What wesay If max number of users is previously known, the application module pool can be configured to suppress recycling. Recycling application modules with the purpose of saving memory is wrong idea of scalability. Activation-safety is mandatory for ADF systems running in Failover Cluster environments, otherwise it may be ignored.
  • 29.
    Maximum Number ofRegions Code vs performance Oracle Service Request: 3-9979119591
  • 30.
    Max No ofRegions: What Docs Say 8.3.6 ADFc: Region Usage “Adding regions to a page can be a powerful addition to the application. However, regions can be a resource-intensive component on the page. For better performance, consider using regions only when the specific functionality is required.” Fusion Middleware Performance and Tuning Guide 11 g “10 is the maximum amount of regions that you should have on a single page just for good performance.” ADF Architecture TV -Performance and Tuning - Controller and View Layer
  • 31.
    Max No ofRegions: Methodology Goal Refactoring a complex page with a hierarchy of 25 regions to a page with a single region, preserving the UI Component layout. We made sure the data was previously queried and cached before page load, so database hit would not affect the measurements.
  • 32.
    Max No ofRegions: Response Time
  • 33.
    Max No ofRegions: Conclusions Subsequent testing while refactoring from 25 regions to 1 region didn’t show any significant improvement below 10 regions use. The improvement was minimal and increased constantly while number of regions decreased. Response time overhead when using 25 regions was 100 ms. This is less than 2% of the response time, when querying is included. Production ADF applications handle thousands of users with 40 regions on the landing page.
  • 34.
    JSP vs Facelets Is conversion to Facelets necessary?
  • 35.
    JSP vs Facelets:What Docs say “Unlike JSP documents, which are compiled into an intermediate Servlet at runtime, Facelets don’t impose this unnecessary overhead and build the JSF component tree directly. This leads to far better performance in the component tree creation and page rendering processes.” JavaServer Faces 2.0 Overview and Adoption Roadmap in Oracle ADF Faces
  • 36.
    JSP vs Facelets:Methodology Goal Tools Migrating a 12c application from jsp to facelets. Oracle Application Testing Suite, DMS Spy Servlet
  • 37.
    JSP vs Facelets:Response Time Faster initialization of facelets
  • 38.
    References http://docs.oracle.com/middleware/1213/adf/develop/index.html http://www.oracle.com/technetwork/database/application-development/jdbc-memory-management- 12c-1964666.pdf https://www.youtube.com/watch?v=FO1soDjSpO4 http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adffaces-jsf20-190927.pdf