2 Replies Latest reply on Oct 15, 2007 4:08 PM by Gavin King

    Questions about SMPC, conversation and session scopes

    Daniel Kane Novice

      Dear colleagues,

      I am implementing SMCP concept in multi-page DBMS application.
      Each page contains number of DataModels and CRUD operations.
      Logically, all data (entities) on all my pages should be scoped to session - all data grids and fields should save their state along the whole user's session. There are no cycles that could be considered as conversations.

      At the same time, SMCP is scoped to conversation. If I understand correctly, I have two options for this situation:

      1) Open global conversation on each page (and join if already opened), and scope all my components to ScopeType.CONVERSATION. This scope would be equal to session scope in fact, and SMCP will work.

      Question : Is it good practice ?


      2) Use session-scoped components (SFSBs by default).

      Questions :
      - should entityManager be injected with (scope=CONVERSATION) in this case ?
      - should dataModels and entity members be explicitly scoped by (scope=CONVERSATION) ?
      - when I create entity variable in method of session-scoped component, will it be correctly managed by conversation-scoped entityManager ("persist" operation, etc.) ?