Monday 17 March 2014

What is Data Control Scopes and Data Control Frame

ADF transactions are defined by the business service implementation used in the application (Application Modules). Application Modules provides the connections and transaction to commit the data into the DB. The AM are exposed to the ViewController layer through an abstraction called Data Control.
By default AM provides transaction for the application to commit the data into the DB. But the developer has the ability to change the transaction flow. Each bounded task flow provides its own transaction and data control scopes, example each bounded task flow can commit data separately or use the default transaction.

In the below image you can see simple bounded taskflow with transaction options.




For a given btf (Bounded Task Flow) there are 4 transaction options.
I)                    No Controller Transaction (btf use the existing default transaction)
II)                  Always Begin New Transaction (btf creates new transaction)
III)                Always Use the Existing Transaction (btf uses the existing transaction)
IV)               Use the Existing Transaction If Possible.
Each btf data control scopes provides option to share the transaction with the other btf or not. It provides 2 options
i)                    Shared
ii)                   Isolated
“Shared”: will try to share any instance of a data control with the task flow's caller if the data controls have the same definition, rather than creating a new instance.


“Isolated”: Even if both task flows use the same design time data control definition, at runtime
 each task flow will have their own instance of the data control.

There is something called Data Control Frame which handles all the data control scopes. Each task flow has its own data control frame and containing list of data control scopes.
A data control frame is created at run-time for the application’s unbounded task flow and for each isolated data control scoped bounded task flow. When bounded task flow specified the shared data control scope and the current task flow uses the data control frame and the instances attached to it.

Alternatively if the bounded task flow specifies an isolated data control scope, a new
frame will be created and a new instance of any data controls used by the bounded task flow will
be attached to this new frame.

The below image shows when the new Data Control Frame is created





As you can see in the above diagram there are three Data Control Frame gets created. The red arrow shows that when the data control scope of the BTF is selected as isolated new Data Control Frame gets created. And when the BTF is Shared, the called BTF uses the dame Data Control Frame and instances attached the same.

1 comment:

  1. Did you realize there's a 12 word phrase you can speak to your man... that will induce intense feelings of love and impulsive attractiveness to you buried within his heart?

    Because deep inside these 12 words is a "secret signal" that fuels a man's impulse to love, cherish and care for you with his entire heart...

    12 Words That Fuel A Man's Love Response

    This impulse is so hardwired into a man's genetics that it will drive him to work better than ever before to build your relationship stronger.

    Matter of fact, triggering this all-powerful impulse is so binding to achieving the best possible relationship with your man that as soon as you send your man one of the "Secret Signals"...

    ...You'll instantly notice him open his soul and heart for you in such a way he's never experienced before and he will identify you as the only woman in the galaxy who has ever truly tempted him.

    ReplyDelete