Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-2301

Docs for new InteractionScope

    XMLWordPrintableJSON

Details

    • Documentation
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Docs & Website
    • None

    Description

      We allow IsisInteractions to be nested. The @IsisInteractionScope is always bound to the top-level IsisInteraction of the current thread's session stack. (first stack element, aka bottom of stack)

      Isis (not Spring) is aware, when any IsisInteractionScope ends. So at the end of each IsisInteractionScope, we call the destruction runnables on the IsisInteractionScope-d beans that belong to the current thread, then clear the IsisInteraction stack (of the current thread). (edited)

      The IsisInteractionScope-d beans are managed by Spring, that is Spring creates them and registers their destruction runnables.

      Requires Provider idiom: we fail early if one tries to inject an IsisInteractionScope-d bean directly. The thrown exception gives a hint, how to fix it. (Use the Provider<> idiom instead)

      Attachments

        1. image (2).png
          154 kB
          Andi Huber
        2. image (3).png
          267 kB
          Andi Huber

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hobrom Andi Huber
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: