Shared contexts

Shared contexts are those contexts above the session contexts. These contexts are potentially accessed from multiple threads corresponding to different user requests at the same time, so some considerations have to be taken into account:

Both the concurrency and clustering problem can be solved by using a safe persistence-based mechanism to manipulate all read-write shared data. A simple, ad-hoc approach is to use a custom database table to access these values. There is also a more generic way supported by BTT since version 5.2: the shared data can be set up so that they are automatically persisted by the framework. This is known as the CHA (Context Hierarchy Area), and since version 7.0, there is a high level of flexibility in the way that this can be configured, either through entity bean persistence, shared memory or any other user-provided mechanism.