Spring Web Flow
  1. Spring Web Flow
  2. SWF-92

Add Flow Managed Persistence Context Support for Hibernate and JPA

    Details

      Description

      Implementation of the long session per conversation pattern. To be implemented:

      • Hibernate-based (session per conversation)
      • JPA (JSR-220) based (managed persistence context)

      Patterns:

      • Stateful Session Bean Pattern
      • Flow Listener Pattern
      1. ExtendedFlowExecutionListenerInterceptor.java
        11 kB
        Andrew Ebaugh
      2. OpenSessionInFlowListenerInterceptor.java
        17 kB
        Andrew Ebaugh

        Issue Links

          Activity

          Hide
          Donnchadh O Donnabhain added a comment -

          Hi Ben, nice work.

          A couple of questions:
          i) Does the session remain bound for the rendering of the view? it looks like it doesn't.
          ii) How will this work in an AJAX scenario? access the hibernate session would need to be serialised

          In both of these cases HibernateSessionPerConversationListener could be extended to provide the required functionality but this may be something to keep in mind.

          Show
          Donnchadh O Donnabhain added a comment - Hi Ben, nice work. A couple of questions: i) Does the session remain bound for the rendering of the view? it looks like it doesn't. ii) How will this work in an AJAX scenario? access the hibernate session would need to be serialised In both of these cases HibernateSessionPerConversationListener could be extended to provide the required functionality but this may be something to keep in mind.
          Hide
          William Parker added a comment -

          Can the updated patch, (including HibernateSessionPerConversationListener), of this enhancement be made available before 1.1 release? If not, when is 1.1 due to be released?

          Apologies if this update is available - I cant seem to locate it. The attachments above our out-dated.

          Show
          William Parker added a comment - Can the updated patch, (including HibernateSessionPerConversationListener), of this enhancement be made available before 1.1 release? If not, when is 1.1 due to be released? Apologies if this update is available - I cant seem to locate it. The attachments above our out-dated.
          Hide
          William Parker added a comment -

          Ignore the above - I've accessed the snapshot.

          Show
          William Parker added a comment - Ignore the above - I've accessed the snapshot.
          Hide
          Erwin Vervaet added a comment -

          A comment from the forums (by Will Parker):

          Hi

          With regards to the above class which is still in beta version...

          Shouldn't the exceptionThrown() method rollback the transaction? Currently it calls unBindSession() which performs a commit().

          Should the lines in exceptionThrown() be changed from:

          Session hibSession = getHibernateSession(context);
          unBindSession(hibSession);

          to....

          Session hibSession = getHibernateSession(context);
          hibSession.getTransaction().rollback();
          TransactionSynchronizationManager.unbindResource(h ibSession);

          Show
          Erwin Vervaet added a comment - A comment from the forums (by Will Parker): Hi With regards to the above class which is still in beta version... Shouldn't the exceptionThrown() method rollback the transaction? Currently it calls unBindSession() which performs a commit(). Should the lines in exceptionThrown() be changed from: Session hibSession = getHibernateSession(context); unBindSession(hibSession); to.... Session hibSession = getHibernateSession(context); hibSession.getTransaction().rollback(); TransactionSynchronizationManager.unbindResource(h ibSession);
          Hide
          Keith Donald added a comment -

          Enhancing for SWF 1.1 m1

          Show
          Keith Donald added a comment - Enhancing for SWF 1.1 m1

            People

            • Assignee:
              Keith Donald
              Reporter:
              Keith Donald
            • Votes:
              23 Vote for this issue
              Watchers:
              26 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 5d Original Estimate - 5d
                5d
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 5d 40m
                5d 40m

                  Development