Creating context and changing data value

About this task

The following scenarios focus on context creating and data value changing. These scenarios happen in scenes like establishing a session when a user logon, and perform the first step of a transaction.

Procedure

  1. Scenario I (for Persistence Shared CHA or Memory Shared CHA)
    Given that you already have a root Context A:
    1. Create a remote Context B
    2. Chain the newly created Context B to the root Context A
    3. Change the value of Context B using the APIs like setValueAt(), setKeyedCollection()
    4. Commit the Context B
  2. Scenario II (for Persistence Shared CHA or Memory Shared CHA)
    Given that you already have a root Context A
    1. Crate a local Context B
    2. Chain the newly created Context B to Context A
    3. Change the value of Context B using the APIs like setValueAt(), setKeyedCollection()
    4. Get the value of Context B using the APIs like getValueAt(), getKeyedCollection()
    5. Unchain the Context B
  3. Scenario III (for Persistence Shared CHA or Memory Shared CHA)
    Given that you already have a remote Context A:
    1. Create a remote Context B
    2. Chain the newly created Context B to the Context A
    3. Change the value of Context B using the APIs like setValueAt(), setKeyedCollection()
    4. Commit the Context A
  4. Scenario IV
    Given that you have a remote Context A:
    1. Create a local Context B
    2. Chain the Context B to the Context A
    3. Change the value of Context B using the APIs like setValueAt(), setKeyedCollection()
    4. Get the value of Context B using the APIs like getValueAt(), getKeyedCollection()
    5. Unchain the Context B
    6. Commit the Context A
  5. Scenario V (for Persistence Shared CHA, Memory Shared CHA, or Local CHA)
    Given that you already have a local Context A:
    1. Create a local Context B
    2. Chain Context B to Context A
    3. Change the value of Context B using the APIs like setValueAt(), setKeyedCollection()
    4. Get the value of Context B using APIs like getValue(0, getKeyedCollection()
    5. Unchain the Context B