+ All Categories
Home > Documents > Demystifying 11i Framework State Management

Demystifying 11i Framework State Management

Date post: 15-Oct-2014
Category:
Upload: floatingbrain
View: 1,048 times
Download: 3 times
Share this document with a friend
Popular Tags:
40
Transcript
Page 1: Demystifying 11i Framework State Management
Page 2: Demystifying 11i Framework State Management

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.

Page 3: Demystifying 11i Framework State Management

<Insert Picture Here>

Demystifying 11i Framework State Management

Barbara J. WaddoupsSenior Principal Instructor, ATG, Oracle [email protected]

Page 4: Demystifying 11i Framework State Management

<Insert Picture Here>

What is “State Management”?

Page 5: Demystifying 11i Framework State Management

<Insert Picture Here>

Anatomy of a Framework Page

Page 6: Demystifying 11i Framework State Management

What is a Framework Page?

Page 7: Demystifying 11i Framework State Management

Framework Page BreakdownPage

–Root Region

•Items

–Buttons

–Fields

–Images

»Sub-regions

–Region

–Region

Page 8: Demystifying 11i Framework State Management

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”

Page 9: Demystifying 11i Framework State Management

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

Page 10: Demystifying 11i Framework State Management

<Insert Picture Here>

Design Methodology

Page 11: Demystifying 11i Framework State Management

Model – View - Controller

Controller

View

UIX

JAVA & XML

Model

BC4J

db

Admin Server

Oa.jspOa.jsp

AMAM

Page 12: Demystifying 11i Framework State Management

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

Page 13: Demystifying 11i Framework State Management

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

Page 14: Demystifying 11i Framework State Management

<Insert Picture Here>

STATE MANAGEMENT COMPONENTS

• Root Application Module

• Application Module Pooling and Passivation

• Servlet Session

• Application User Session

• Page Context

• Request

Page 15: Demystifying 11i Framework State Management

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

Page 16: Demystifying 11i Framework State Management

<Insert Picture Here>

Root Application Modules

(Database Session and Transaction State)

Page 17: Demystifying 11i Framework State Management

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.

Page 18: Demystifying 11i Framework State Management

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

Page 19: Demystifying 11i Framework State Management

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

Page 20: Demystifying 11i Framework State Management

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

Page 21: Demystifying 11i Framework State Management

<Insert Picture Here>

Application Module Pooling and Passivation

Page 22: Demystifying 11i Framework State Management

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

Page 23: Demystifying 11i Framework State Management

<Insert Picture Here>

Servlet Session / Oracle Application User Session

Page 24: Demystifying 11i Framework State Management

Servlet Session / Application User Session

Servlet

4

ICX Sessions

Table

WebAppsContextSession

CookieSession

Servlet

User

Session

Servlet

3

Servlet

2

Page 25: Demystifying 11i Framework State Management

<Insert Picture Here>

Page Context

Page 26: Demystifying 11i Framework State Management

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 27: Demystifying 11i Framework State Management

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

Page 28: Demystifying 11i Framework State Management

<Insert Picture Here>

Request

Page 29: Demystifying 11i Framework State Management

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

Page 30: Demystifying 11i Framework State Management

<Insert Picture Here>

Profile Options

Page 31: Demystifying 11i Framework State Management

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

Page 32: Demystifying 11i Framework State Management

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

Page 33: Demystifying 11i Framework State Management

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

Page 34: Demystifying 11i Framework State Management

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

Page 35: Demystifying 11i Framework State Management

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

Page 36: Demystifying 11i Framework State Management

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

Page 37: Demystifying 11i Framework State Management

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

Page 38: Demystifying 11i Framework State Management
Page 39: Demystifying 11i Framework State Management

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

Page 40: Demystifying 11i Framework State Management

Recommended