Thursday, January 30, 2014

Memory scopes explained in Oracle ADF

Application:
- Will last as long as any user working with the application exists
- Whatever is put into this scope is available to all the users
- Some configuration data that could be shared across all the users

Session
- Exists for the duration of the user working with an application
- Exists from the time of creation to the time they are deleted or session is closed
- Attributes are the user instance specific for example user name

PageFlow - ADF Specific Scope
- Every taskflow (bounded, unbounded) has the pageflow scope
- Lasts as long as the taskflow is active
- Unbounded taskflow lasts as long as the application is active = Session but some exceptions
- If we are calling a bounded taskflow from unbounded taskflow,
then the pageflow scope of the unbounded taskflow is suspended and put in the stack and recovered later
- It is always dedicated to the taskflow that I am currently in
- Parent TaskFlow's PageFlow scope can't peak into the called bounded taskflow's Pageflow scope and vice versa

View
- Will last as long as the page is alive here, for example we could send multiple request from the same single page
- Even on redirecting to the same page will keep the view scope alive
- Temp info that we use on a specific page that to be kept between requests
 The object is available until the ID for the current view changes. 

Request
- Client pinging the server and server responding to the server is the duration

BackingBean Scope
A backing bean is a convention to describe a managed bean that stores accessors for UI components and event handling code on a JSF page.
- It exists for the duration of a request and should not be used to maintain state.
- Same duration as that of request
- Special Case of the request scope
- Associated with specific managed bean instance
This is needed because there may be more than one page fragment or declarative component on a page, and to avoid collisions between values, any values must be kept in separate scope instances. 

No comments:

Post a Comment