Workspaces support and the Business Context Service

The Business Context Service supports workspaces by using the Content Context and Task Context business contexts. Business logic can determine the context of the current request, and retrieve the appropriate data, by using the Business Context Service.

When a request is considered a workspace request, then the ContentContext is set with a valid workspace. The ContentContext is a predefined Business Context provided by the business context service. The processing is described in the following steps:
  1. A request is received with a valid workspace set in the ContentContext of the request.
  2. The ContentContext checks at the beginning of the transaction to switch the schema to point to the appropriate read schema for the request.
  3. The business logic performs appropriate operations, if required, based on the workspace request.
  4. For a read request, all pending EJB transactions are flushed, then the connections are restored to the original state and returned to the database connection pool.
  5. For a write request, the SQL cannot be executed directly and an intermediate layer to handle the details:
    • For the name-value pair programming model, the intermediate layer is the resource managers.
    • For a BOD service module, it is the data service layer.