Upload
floatingbrain
View
1.056
Download
3
Tags:
Embed Size (px)
Citation preview
Disclaimer
This document in any form, software or printed matter, contains proprietary information that is the exclusive property of Oracle. Your access to and use of this confidential material is subject to the terms and conditions of your Oracle Software License and Service Agreement, which has been executed and with which you agree to comply. This document and information contained herein may not be disclosed, copied, reproduced or distributed to anyone outside Oracle without prior written consent of Oracle. This document is not part of your license agreement nor can it be incorporated into any contractual agreement with Oracle or its subsidiaries or affiliates.
This document is for informational purposes only and is intended solely to assist you in planning for the implementation and upgrade of the product features described. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described in this document remains at the sole discretion of Oracle.
Due to the nature of the product architecture, it may not be possible to safely include all features described in this document without risking significant destabilization of the code.
<Insert Picture Here>
Demystifying 11i Framework State Management
Barbara J. WaddoupsSenior Principal Instructor, ATG, Oracle [email protected]
<Insert Picture Here>
What is “State Management”?
<Insert Picture Here>
Anatomy of a Framework Page
What is a Framework Page?
Framework Page BreakdownPage
–Root Region
•Items
–Buttons
–Fields
–Images
»Sub-regions
–Region
–Region
Terminology
• BC4J – Business Components for JavaJava packages/class files referenced in Oracle Applications and
built for custom applications
• AOL/J – Application Object Library for JavaJava packages/class files explicitly built for
securing/authenticating connections to Oracle Applications
• OC4J – Oracle Containers for J2EECore runtime J2EE components for Oracle Applications
Framework pages
• UIX – User Interface XMLPresentation components for rendering a Framework page
• OA Framework – “The Glue”
How Does A Page Get Displayed?
Client
Http Request
Web Server
SessionSession
Read XML
Read Class Files
HTML Returned via UIX
Define Web Bean Hierarchy
Web Bean Hierarchy
<Insert Picture Here>
Design Methodology
Model – View - Controller
Controller
View
UIX
JAVA & XML
Model
BC4J
db
Admin Server
Oa.jspOa.jsp
AMAM
ModelEO (Entity Expert)•Encapsulates Data •Represents One Row•Setters and Getters•Data Integrity/Validation/Locking, Posting
VO (View Object)•Represents Query & Data (all returned rows)•Builds (Instantiates) EO•Contains pointers to EO Rows
AM (Application Module)•Container for VO’s•Controls DB Transaction (OADBTransaction)
AO (Association Object)•Links EO’s (master/detail)•Setters and Getters
Controller•Holds code for regions•ProcessRequest – Get Action•ProcessFormData – Post Action•ProcessFormRequest – Post Action
View•User Interface (UIX/OA Extensions)•Instantiates files•Reads Java & XML à HTML
Model (cont)VL (View Link)•Links VOs
VVO (Validation View Object)•Stores Composite Relationships•Used for validation
EE (Entity Expert Class)•Created on Parent EO of composite relationship•References relationships for validation•Cached in memory
PVO (Property View Object)•Tracks state of rendered property•Used with Partial Page Rendering•Contains a single row
DBEO
VVO
VAM
AO
EO
VOVL
VO
AMCO
PVO
Controller Actions
GET (ProcessRequest Method)
Validateà Fetch à AMà Instantiate àUser on App MDS Access to BC4J objects BC4J (some) & UIX
(XML & Java BC4J ) Transaction Context Build WebBean Hierarchy
Establishes DB Connect
Post Process à RenderComplex Bean Read JAVA & XMLProcessing Build HTML
Populate Page
POST (ProcessFormData & ProcessFormRequest Methods)
Submit à Validate User à ProcessFormData à ProcessFormRequest àClient-Side Possibly Retain Submit Form Detect Button ActionValidation State if needed Validate VO’s & EO’s Validate & Commit
Render PageRead JAVA & XMLBuild HTMLPopulate Page
<Insert Picture Here>
STATE MANAGEMENT COMPONENTS
• Root Application Module
• Application Module Pooling and Passivation
• Servlet Session
• Application User Session
• Page Context
• Request
Conceptual View of State Management
db
ICX SESSIONS
Table
Java Virtual Machine (JVM)
Servlet Session WebAppsContext
Application State Application State
OA.jsp (servlet)
OAPageBean
OADBTransaction
OAPageContext
Application State
Application State
Request
<RootAppModule>AMImpl
Application
State
Caches
References
Contains
Uses
<Insert Picture Here>
Root Application Modules
(Database Session and Transaction State)
Root Application Module• Each OA Framework page is associated with a root application
module.
• The root application module • Provides transaction context
• Provides JDBC Database connection (In OA Framework, a database session is associated with a JDBC connection).
• Caches the core application data (BC4J view objects, entity objects, etc, and the web bean hierarchy) on the root application’s oracle.apps.fnd.framework.OADBTransaction object.
• Provides accessibility to transaction data for all pages that share the same root application instance (as long as the data is retained between pages).
• Provides methods to retrieve, store and remove application data within the root application module
• oracle.apps.fnd.framework.webui.OAPageContext (for controller)
• OADBTransaction (for model) classes.
Typical User Navigation/Application Module Instantiation
Page A Page B
Navigates
Root Application Module
Page AAM Instance #1
Uses Uses
Root Application Module
Page BAM Instance #1
Response
RequestServlet
Session
User Navigation/Application Module Retention
Navigates
Page A
RetainAM=Y
Root Application Module
Task CAM Instance #1
Uses
Page B
RetainAM=YRequest
Servlet
Session
Response
When to Release/Retain Application Modules
Retain - for Multiple Pages. Page Branch will have it’s own AM. Use OAPageContext.releaseRootApplicationModule method to release AM in the branch page
Multiple Pages, Related Tasks, Single Transaction with Page Branch to Perform Discrete Task
RetainMultiple Pages, Different Tasks, Same BC4J Object
RetainMultiple Pages, Related Tasks, Single Transaction Desired
Do Not RetainMultiple Page, Unrelated Tasks, Multiple Transactions Desired
<Insert Picture Here>
Application Module Pooling and Passivation
Root Application Module Pooling/Passivation
JVM Session
Root AM Pool Manager
User A
User B begin1
PageA Root AM
end1
end1
Passivate
AM - Instance 1Referenced Un-Referenced
begin2
AM -Instance 2
begin1
Reinstate
end2
<Insert Picture Here>
Servlet Session / Oracle Application User Session
Servlet Session / Application User Session
Servlet
4
ICX Sessions
Table
WebAppsContextSession
CookieSession
Servlet
User
Session
Servlet
3
Servlet
2
<Insert Picture Here>
Page Context
Page Context - Simple Page Processing
Http Page A
Request
Servlet Session
Page
Context
Page A
Http A
Response (Display Page)
Page B
Http Page B
Request
Page
Context
Request/Page Boundary
Page Context - Complex Page Processing
Servlet Session
Http Page A
Request
Page
Context
Page A
Page B
JSP Forward
Http Page A Response
Page Boundary
Request Boundary
<Insert Picture Here>
Request
HTTP Request – Page Context
Http Page A Request Page
Context
Servlet Session
• URL Parameters
• Form Field Data Values ( on POST)
•Web Bean/Event Name related for user selection (on POST)
•Hidden Fields
•JSP Page Forwards
•Access Via:
•OAPageContext.getParameter*( ) Methods
•OAPageContext.putParameter Method
•OAPageContext.setForward*( ) Methods
<Insert Picture Here>
Profile Options
Profile Options - ICX
Maximum Idle Time for session in minutes
ICX: Session Timeout
4 / NAMaximum user session in hoursICX: Limit Time
Default/
Suggested
Setting
DescriptionProfile Option
Profile Options – Application Module
300000/300000
(5 min)
How long the AM Pool Monitor can sleep prior to waking up and destroying inactive root AM’s. Set time in milliseconds
FND: Application Module Pool Monitor Sleep Interval
Yes/YesIndicates whether AM Pooling is enabled. Disabling can create serious performance degradation.
FND: Application Module Pool Enabled
Default/
Suggested
Setting
DescriptionProfile Option
Profile Options – Application Module
180000/180000
(3 minutes)
The time-out period in milliseconds for available, inactive application modules.
FND: Application Module Pool Maximum Inactive Age
10/10The number of application module instances the pool will create before passivating and recycling the application modules for reuse.
FND: Application Module Pool Recycle Threshold
Default/
Suggested
Setting
DescriptionProfile Option
Profile Options – Application Module
10The maximum number of available application modules allowed per pool (high water mark).
FND: Application Module Pool Maximum Available Size
0 The minimum number of available application modules allowed per pool (low water mark).
FND: Application Module Pool Minimum Available Size
Default/
Suggested
Setting
DescriptionProfile Option
Profile Options – Application Module
None / Indicates if passivation is enabled.
Valid values: None, Resource Threshold, Request
FND: PassivationLevel
No / No –At Application Level
Used only if FND: Passivation Level set to Resource Threshold or Request. Set to No until application fully certified with Passivation
FND: Session Timeout Recovery Enabled
No/YesIndicates whether the connection associated with an Application module should be checked into the connection pool on AM checkin when application modules are pooled.
FND: Application Module Connection Pool Enabled
Default/
Suggested
Setting
DescriptionProfile Option
New Framework Application Module Property Setting
RESERVE_FULL / MANAGE_STATE
RESERVE_FULL – Indicates that the root AM is used exclusively for the current user thread between requests. Does not guarantee state management during failover.
MANAGE_STATE – Root AM and connection can be released between threads. AM is guaranteed to be preserved.
CONNECTION_AGNOSTIC – Connection may be released between threads. Only use if connection is not dependent on DB State references (PL/SQL, Global Variables, etc)
Retention Level
Default/
Suggested
Setting
Property Value OptionsAM Property
Additional Information
http://education.oracle.com
11i Extend Oracle Applications: Extending OA Framework
Applications (E-Business Suite) 5 Days
11i Extend Oracle Applications: Customizing OA Framework
Applications (E-Business Suite) 4 Days
http://www.oracle.com/technology/index.html
http:// www.oracle.com/technology/products/jdev/viewlets/viewlet.html
ReferencesOracle Corporation. Oracle Applications Framework Technical Reference Release 11.5.10.2 “OA Framework State Management” , 2000 - 2005
Oracle Corporation. Application Development Framework Developer's Guide For Forms/4GL Developers 10g Release 3 (10.1.3.0) “Understanding Why State Management is Necessary”
Reilly, David. “State and session tracking with Java servlets, Part 1: Using cookies”. <http://www.developer.com/tech/article.php/616801>
Reilly, David. “State and session tracking with Java servlets, Part 2: Securing data”. <http://www.developer.com/tech/article.php/616831>
Flanagan, David. Java In A Nutshell, A Desktop Quick Reference.O’Reilly Media, Inc., 2005
Oracle University. 11i Extend Oracle Applications: Building OA Framework Applications. Ed 1.1, October 2005