Uploaded image for project: 'Spring.NET'
  1. Spring.NET
  2. SPRNET-1431

Workaround for 'conversation scope' and "session-per-conversation"

    Details

      Description

      I worked on an Workaround for 'conversation scope' on 'Spring.Net 1.3.0'.

      The problem is well known: In some situations it is necessary that the objects are not as durable as the as those of "session scope" and not as volatile as those of "request scope".

      I suggest the implementation attached. The tests are included.

      Basically I considered the following features:

      • Start / End of Conversation;
      • Nested conversations;
      • Conversation timeout;
      • "session-per-converastion" (NHibernate)

      "session-per-converastion" pattern:
      When a conversation with a 'hibernate Session' is started/resumed
      the session is created/reconnected.
      Some limitations exists:
      1) Participating in existing Hibernate SessionFactory IS NOT ALOWED. In the same way, 'Deferred close' IS NOT ALOWED.
      2) Only one conversation can have 'true' value in "ISession.IsConnected" for its ISession simultaneously.

      I took into consideration what I found in the following references:

      For build and tests, you can use 'vs2005' or 'vs2008 express'
      Dependences:
      Targhet Framework: '.Net Framework 2.0'
      Spring.Conversation:
      -..\lib\spring\lib\Common.Logging.dll (1.2.0.0)
      -..\lib\nhibernate\Iesi.Collections.dll (1.0.1.0)
      -..\lib\nhibernate\NHibernate.dll (2.1.2.4000)
      -..\lib\spring\Spring.Core.dll (1.3.0.20349)
      -..\lib\spring\Spring.Data.dll (1.3.0.20349)
      -..\lib\spring\Spring.Data.NHibernate21.dll (1.3.0.20349)
      Spring.Conversation.Test:
      -..\lib\spring\lib\Common.Logging.dll (1.2.0.0)
      -..\lib\spring\lib\Common.Logging.Log4Net.dll (1.2.0.2)
      -..\lib\log4net.dll (1.2.10.0)
      -..\lib\nunit.framework.dll (2.4.7.0)
      -..\lib\NUnitAspEx.dll (2.0.4100.26265)
      -..\lib\spring\Spring.Core.dll (1.3.0.20349)
      -..\lib\spring\Spring.Data.dll (1.3.0.20349)
      -..\lib\spring\Spring.Web.dll (1.3.0.20349)
      -(GAC)\System.Data.SQLite (1.0.66.0) (http://sqlite.phxsoftware.com/) (http://sourceforge.net/projects/sqlite-dotnet2/files/SQLite%20for%20ADO.NET%202.0/1.0.66.0/SQLite-1.0.66.0-setup.exe/download)

      Sorry for some spelling errors. I do not speak English very well.
      Cheers, Hailton de Castro.

        Attachments

          Activity

            People

            • Assignee:
              sbohlen Steve Bohlen
              Reporter:
              hailtondecastro Hailton de Castro
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: