Uploaded image for project: 'Spring Web Flow'
  1. Spring Web Flow
  2. SWF-893

Open session in view

    XMLWordPrintable

    Details

      Description

      Please provide XXXFlowExecutionListener that will work the same as OpenSessionInViewInterceptor, but close session after view rendering. Flows marked as <persistence-context/> it should walk around.

      The reasons:

      For now the only way to have open hibernate session in view with SWF is using flow managed persistence (<persistence-context/> tag).

      OpenSessionInViewInterceptor allows only to have single session in flow controller, but in view it has no sence because of using Post+Redirect+Get pattern (there is a new http request for view rendering, so there is a new hibernate session). Even for this purpose (having single session in flow controllers for non <persistence-context> flows) is impossible because when there is at least one <persistence-context> flow, the application fails when entering this flow.

      Marking all flows where I need open session in view as <persistence-context/> I can't beacuse there many issues appear.

      See related forum thread http://forum.springframework.org/showthread.php?t=58645

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kdonald Keith Donald
              Reporter:
              and Andrey Petrenko
              Votes:
              19 Vote for this issue
              Watchers:
              17 Start watching this issue

                Dates

                Created:
                Updated: