Runtime tools : Core components : CHA : Tasks : Context life cycle : Fetching and changing data
  
Fetching and changing data
The following scenarios focus on Data fetching and changing. These scenarios will happen in almost every transaction or transaction step.
Scenario VI (for Persistence Shared CHA or Memory Shared CHA)
1 Use getContextbyInstanceID() to get the Context A with the given Instance ID
2 Get the value of the Context A using the APIs like getValueAt(), getKeyedCollection()
3 Change the value of Context A using the APIs like setValueAt(), setKeyedCollection()
4 Commit Context A
Scenario VII (for Persistence Shared CHA or Memory Shared CHA)
1 Use the getContextbyInstanceID() to get the Context A with the given Instance ID
2 Get Context B, one of the children of the Context A
3 Get the value of the Context B using the APIs like getValueAt(), getKeyedCollection()
4 Change the value of Context B using the APIs like setValueAt(), setKeyedCollection()
5 Commit Context A
Scenario VIII (for Local CHA)
1 Use getContextbyInstanceID() to get the Context A with the given Instance ID
2 Get the value of the Context A using the APIs like getValueAt(), getKeyedCollection()
3 Change the value of Context A using the APIs like setValueAt(), setKeyedCollection()
Scenario IX (for Local CHA)
1 Use getContextbyInstanceID() to get the Context A with the given Instance ID
2 Get Context B, one of the children of the Context A
3 Get the value of the Context B using the APIs like getValueAt(), getKeyedCollection()
4 Change the value of Context B using the APIs like setValueAt(), setKeyedCollection()
Go up to
Context life cycle