Thursday, 16 July 2015

what is page definition scope? how many instances of the data controls will be created at runtime?

Asking question about pageFlowScope, sessionScope and others leads to one of the most important (in my opinion) graphs:


What is worth to mention, applicationScope lives with an application within the JVM container. If you have clustered environment, you'll have at most one instance per node (lazy init principle).

Nevertheless, what is page definition scope or data control scope? How many instances of data controlls will be created in runtime? Quote from the docs:

"(...) the binding container, the binding objects it contains, and the values the binding objects reference are defined in session scope."

But it doesn't mean that there is equation one session == one binding container (data control instance). Please notice that ADF introduces taskflows and task flow transactions. If your application uses a lot of task flows as regions on one page and some of them are always creating new transactions (on the controller level), per each session you'll have more than one binding frame.

As a summary - from the time point of view, each data control instance (each binding container) will live as long as user session exist. From the instances count point of view, per each session you'll have 0..n instances of the data controls (depends on total number of used task flows on your pages, task flow transaction setting and the page definition contents).

No comments:

Post a Comment