fixing up conversation example app

This commit is contained in:
Steve Bohlen
2012-12-27 17:32:28 -05:00
parent 548ff07815
commit 74a84170ca
15 changed files with 33 additions and 35 deletions

View File

@@ -8,7 +8,7 @@ using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Spring.ConversationWA;
using Spring.Web.Conversation;
/// <summary>
/// Base classe for page's that suport conversation.

View File

@@ -3,7 +3,7 @@ using Spring.Northwind.Dao;
using Spring.Northwind.Domain;
using Spring.Web.UI;
public partial class CustomerEditor : Page
public partial class CustomerEditor : ConversationPage
{
private ICustomerEditController customerEditController;
private ICustomerDao customerDao;

View File

@@ -41,9 +41,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\bin\net\4.0\debug\Common.Logging.dll</HintPath>
</Reference>
<Reference Include="Common.Logging.Log4Net, Version=1.2.0.2, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\net\2.0\Common.Logging.Log4Net.dll</HintPath>
<Reference Include="Common.Logging.Log4Net1210">
<HintPath>..\..\lib\net\2.0\Common.Logging.Log4Net1210.dll</HintPath>
</Reference>
<Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>

View File

@@ -20,7 +20,7 @@
</configSections>
<common>
<logging>
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net">
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net1210">
<!-- choices are INLINE, FILE, FILE-WATCH, EXTERNAL-->
<!-- otherwise BasicConfigurer.Configure is used -->
<!-- log4net configuration file is specified with key configFile-->
@@ -57,7 +57,7 @@
<add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
<!--<add name="OpenSessionInView" type="Spring.Data.NHibernate.Support.OpenSessionInViewModule, Spring.Data.NHibernate21"/>-->
<!--Module that controls the conversations at the end of the request. Ends the Conversations in timeout and pause the conversations at the end of the request.-->
<add name="ConversationModule" type="Spring.ConversationWA.HttpModule.ConversationModule, Spring.Web.Conversation.NHibernate32"/>
<add name="ConversationModule" type="Spring.Web.Conversation.HttpModule.ConversationModule, Spring.Web.Conversation.NHibernate32"/>
</httpModules>
<httpHandlers>
<add verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/>

View File

@@ -20,7 +20,7 @@
</configSections>
<common>
<logging>
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net">
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net1210">
<!-- choices are INLINE, FILE, FILE-WATCH, EXTERNAL-->
<!-- otherwise BasicConfigurer.Configure is used -->
<!-- log4net configuration file is specified with key configFile-->
@@ -57,7 +57,7 @@
<add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
<!--<add name="OpenSessionInView" type="Spring.Data.NHibernate.Support.OpenSessionInViewModule, Spring.Data.NHibernate21"/>-->
<!--Module that controls the conversations at the end of the request. Ends the Conversations in timeout and pause the conversations at the end of the request.-->
<add name="ConversationModule" type="Spring.ConversationWA.HttpModule.ConversationModule, Spring.Web.Conversation.NHibernate32"/>
<add name="ConversationModule" type="Spring.Web.Conversation.HttpModule.ConversationModule, Spring.Web.Conversation.NHibernate32"/>
</httpModules>
<httpHandlers>
<add verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/>

View File

@@ -20,7 +20,7 @@
</configSections>
<common>
<logging>
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net">
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net1210">
<!-- choices are INLINE, FILE, FILE-WATCH, EXTERNAL-->
<!-- otherwise BasicConfigurer.Configure is used -->
<!-- log4net configuration file is specified with key configFile-->
@@ -57,7 +57,7 @@
<add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
<!--<add name="OpenSessionInView" type="Spring.Data.NHibernate.Support.OpenSessionInViewModule, Spring.Data.NHibernate21"/>-->
<!--Module that controls the conversations at the end of the request. Ends the Conversations in timeout and pause the conversations at the end of the request.-->
<add name="ConversationModule" type="Spring.ConversationWA.HttpModule.ConversationModule, Spring.Web.Conversation.NHibernate32"/>
<add name="ConversationModule" type="Spring.Web.Conversation.HttpModule.ConversationModule, Spring.Web.Conversation.NHibernate32"/>
</httpModules>
<httpHandlers>
<add verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/>

View File

@@ -24,11 +24,11 @@
<!--Conversation for 'Default.aspx'-->
<!--"convDefault" will have only one functionality: trigger the release of other conversations when started (StartResumeConversation())-->
<object name="convDefault" type="Spring.ConversationWA.Imple.WebConversationSpringState, Spring.Web.Conversation.NHibernate32" scope="session">
<object name="convDefault" type="Spring.Web.Conversation.WebConversationSpringState, Spring.Web.Conversation.NHibernate32" scope="session">
<property name="Id" value="convDefault"></property>
<property name="TimeOut" value="0"></property>
<property name="ConversationManager" ref="conversationManager"></property>
<property name="SessionFactory" ref="NHibernateSessionFactory"/>
<property name="SessionFactoryName" value="NHibernateSessionFactory"/>
<property name="DbProviderName" value="DbProvider"/>
</object>
@@ -97,19 +97,19 @@
<!--Conversation for 'CustomerEditor.aspx', 'CustomerList.aspx', 'CustomerOrders.aspx', 'CustomerView.aspx', and 'FulfillmentResult.aspx'-->
<!--Important: If the application had other parties ("management employees" for example), they should use another conversation.-->
<object name="convCustomer" type="Spring.ConversationWA.Imple.WebConversationSpringState, Spring.Web.Conversation.NHibernate32" scope="session">
<object name="convCustomer" type="Spring.Web.Conversation.WebConversationSpringState, Spring.Web.Conversation.NHibernate32" scope="session">
<property name="Id" value="convCustomer"></property>
<property name="TimeOut" value="0"></property>
<property name="ConversationManager" ref="conversationManager"></property>
<property name="SessionFactory" ref="NHibernateSessionFactory"/>
<property name="SessionFactoryName" value="NHibernateSessionFactory"/>
<property name="DbProviderName" value="DbProvider"/>
<!--Using workaround for 'conversation scope' to reference for 'CustomerEditController'. It is not as volatile as "request scope" not as durable as the "session scope"-->
<property name="['CustomerEditController']" ref="CustomerEditController"></property>
</object>
<!--Conversation Manager-->
<object name="conversationManager" type="Spring.ConversationWA.Imple.WebConversationManager, Spring.Web.Conversation.NHibernate32" scope="session">
<property name="SessionFactory" ref="NHibernateSessionFactory"/>
<object name="conversationManager" type="Spring.Web.Conversation.WebConversationManager, Spring.Web.Conversation.NHibernate32" scope="session">
<property name="SessionFactoryName" value="NHibernateSessionFactory"/>
<property name="EndPaused" value="true"/>
</object>

View File

@@ -1,6 +1,6 @@
I prepared the sample application and posted in
https://jira.springsource.org/browse/SPRNET-1431 as the file
"Spring.ConversationWA.example.zip.".
"Spring.Web.Conversation.example.zip.".
Below explanations to clarify (or not) what I did.
This "sample application" is a modification of "Spring.Data.NHibernate.Northwind"
@@ -29,7 +29,7 @@ IMPORTANT: Never use a single conversation for the entire application (with the
conversation should be limited to a subset of the application pages, and must
be discarded at the end of interaction with this subset
(IConversationState.EndConversation()).
In "Spring.ConversationWA.Imple.WebConversationManager" keep
In "Spring.Web.Conversation.WebConversationManager" keep
[<property name="EndPaused" value="true"/>] is recommended, so when you start
a conversation the others are discarded.
@@ -46,7 +46,7 @@ List of changes in "Spring.Data.NHibernate.Northwind":
-web.config
-module, added:
<!--Module that controls the conversations at the end of the request. Ends the Conversations in timeout and pause the conversations at the end of the request.-->
<add name="ConversationModule" type="Spring.ConversationWA.HttpModule.ConversationModule, Spring.ConversationWA"/>
<add name="ConversationModule" type="Spring.Web.Conversation.HttpModule.ConversationModule, Spring.Web.Conversation"/>
-module, removed:
<add name="OpenSessionInView" type="Spring.Data.NHibernate.Support.OpenSessionInViewModule, Spring.Data.NHibernate21"/>
@@ -73,14 +73,14 @@ List of changes in "Spring.Data.NHibernate.Northwind":
-conversation manager
<!--Conversation Manager-->
<object name="conversationManager" type="Spring.ConversationWA.Imple.WebConversationManager, Spring.ConversationWA" scope="session">
<object name="conversationManager" type="Spring.Web.Conversation.WebConversationManager, Spring.Web.Conversation" scope="session">
<property name="SessionFactory" ref="NHibernateSessionFactory"/>
<property name="EndPaused" value="true"/>
</object>
-Customer Conversation
<!--Conversation for 'CustomerEditor.aspx', 'CustomerList.aspx', 'CustomerOrders.aspx', 'CustomerView.aspx', and 'FulfillmentResult.aspx'-->
<!--Important: If the application had other parties ("management employees" for example), they should use another conversation.-->
<object name="convCustomer" type="Spring.ConversationWA.Imple.WebConversationSpringState, Spring.ConversationWA" scope="session">
<object name="convCustomer" type="Spring.Web.Conversation.WebConversationSpringState, Spring.Web.Conversation" scope="session">
<property name="Id" value="convCustomer"></property>
<property name="TimeOut" value="0"></property>
<property name="ConversationManager" ref="conversationManager"></property>
@@ -139,7 +139,7 @@ List of changes in "Spring.Data.NHibernate.Northwind":
...
<!--Conversation for 'Default.aspx'-->
<!--"convDefault" will have the unique functionality: trigger the release of other conversations when started (StartResumeConversation())-->
<object name="convDefault" type="Spring.ConversationWA.Imple.WebConversationSpringState, Spring.ConversationWA" scope="session">
<object name="convDefault" type="Spring.Web.Conversation.WebConversationSpringState, Spring.Web.Conversation" scope="session">
<property name="Id" value="convDefault"></property>
<property name="TimeOut" value="0"></property>
<property name="ConversationManager" ref="conversationManager"></property>
@@ -191,6 +191,6 @@ List of changes in "Spring.Data.NHibernate.Northwind":
</logger>
...
<!--detail's about Conversation-->
<logger name="Spring.ConversationWA">
<logger name="Spring.Web.Conversation">
<level value="DEBUG" />
</logger>

View File

@@ -978,7 +978,7 @@ them or copy their values to attached objects. This causes many lines of
<h2>Supplementary Answer:</h2>
<p>I prepared the sample application and posted in <a href="https://jira.springsource.org/browse/SPRNET-1431" rel="nofollow">SPRNET-1431 Workaround for 'conversation scope' and "session-per-conversation"</a> as the file "Spring.ConversationWA.example.7z".</p>
<p>I prepared the sample application and posted in <a href="https://jira.springsource.org/browse/SPRNET-1431" rel="nofollow">SPRNET-1431 Workaround for 'conversation scope' and "session-per-conversation"</a> as the file "Spring.Web.Conversation.example.7z".</p>
<p>Below, I wrote explanations to clarify (or not) what I did.</p>
@@ -1009,7 +1009,7 @@ keeps a cache of all loaded objects, if the conversation is held for a
long time this cache tends to grow indefinitely (the limit is the amount
of database records). That is, each conversation should be limited to a
subset of the application pages, and must be discarded at the end of
interaction with this subset (<code>IConversationState.EndConversation()</code>). Recommendation: Keep <code>&lt;property name="EndPaused" value="true"/&gt;</code> in "Spring.ConversationWA.Imple.WebConversationManager", so when start a conversation the others are discarded.</p>
interaction with this subset (<code>IConversationState.EndConversation()</code>). Recommendation: Keep <code>&lt;property name="EndPaused" value="true"/&gt;</code> in "Spring.Web.Conversation.WebConversationManager", so when start a conversation the others are discarded.</p>
<p>ADDITIONAL INFORMATION: The unit tests
("Spring.Northwind.IntegrationTests.2008") are not working. But there is
@@ -1030,7 +1030,7 @@ that. </p>
<li><p>module, added:
</p>
<pre class="default prettyprint"><code><span class="tag">&lt;add</span><span class="pln"> <br>&nbsp; </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ConversationModule"</span><span class="pln"> <br>&nbsp; </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"Spring.ConversationWA.HttpModule.ConversationModule, Spring.ConversationWA"</span><span class="tag">/&gt;</span><span class="pln"> &nbsp;<br></span><span class="tag">&lt;add</span><span class="pln"> <br>&nbsp; </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ConversationModule"</span><span class="pln"> <br>&nbsp; </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"Spring.ConversationWA.HttpModule.ConversationModule, Spring.ConversationWA"</span><span class="tag">/&gt;</span><span class="pln"><br></span></code></pre></li>
<pre class="default prettyprint"><code><span class="tag">&lt;add</span><span class="pln"> <br>&nbsp; </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ConversationModule"</span><span class="pln"> <br>&nbsp; </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"Spring.Web.Conversation.HttpModule.ConversationModule, Spring.Web.Conversation"</span><span class="tag">/&gt;</span><span class="pln"> &nbsp;<br></span><span class="tag">&lt;add</span><span class="pln"> <br>&nbsp; </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ConversationModule"</span><span class="pln"> <br>&nbsp; </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"Spring.Web.Conversation.HttpModule.ConversationModule, Spring.Web.Conversation"</span><span class="tag">/&gt;</span><span class="pln"><br></span></code></pre></li>
<li><p>module, removed:
</p>
@@ -1046,11 +1046,11 @@ that. </p>
<li><p>conversation manager
</p>
<pre class="default prettyprint"><code><span class="com">&lt;!--Conversation Manager--&gt;</span><span class="pln"><br></span><span class="tag">&lt;object</span><span class="pln"> <br>&nbsp; &nbsp; </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"conversationManager"</span><span class="pln"> <br>&nbsp; &nbsp; </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"Spring.ConversationWA.Imple.WebConversationManager, Spring.ConversationWA"</span><span class="pln"> <br>&nbsp; &nbsp; </span><span class="atn">scope</span><span class="pun">=</span><span class="atv">"session"</span><span class="tag">&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SessionFactory"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"NHibernateSessionFactory"</span><span class="tag">/&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"EndPaused"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"true"</span><span class="tag">/&gt;</span><span class="pln"><br></span><span class="tag">&lt;/object&gt;</span><span class="pln"><br></span></code></pre></li>
<pre class="default prettyprint"><code><span class="com">&lt;!--Conversation Manager--&gt;</span><span class="pln"><br></span><span class="tag">&lt;object</span><span class="pln"> <br>&nbsp; &nbsp; </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"conversationManager"</span><span class="pln"> <br>&nbsp; &nbsp; </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"Spring.Web.Conversation.WebConversationManager, Spring.Web.Conversation"</span><span class="pln"> <br>&nbsp; &nbsp; </span><span class="atn">scope</span><span class="pun">=</span><span class="atv">"session"</span><span class="tag">&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SessionFactory"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"NHibernateSessionFactory"</span><span class="tag">/&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"EndPaused"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"true"</span><span class="tag">/&gt;</span><span class="pln"><br></span><span class="tag">&lt;/object&gt;</span><span class="pln"><br></span></code></pre></li>
<li><p>Customer Conversation
</p>
<pre class="default prettyprint"><code><span class="com">&lt;!--<br>&nbsp;Conversation for 'CustomerEditor.aspx', 'CustomerList.aspx', <br>&nbsp;'CustomerOrders.aspx', 'CustomerView.aspx', &nbsp;and 'FulfillmentResult.aspx'<br>--&gt;</span><span class="pln"><br></span><span class="com">&lt;!--<br>&nbsp;Important: If the application had other parties<br>&nbsp;("management employees" for example), they should use another <br>&nbsp;conversation.<br>--&gt;</span><span class="pln"><br></span><span class="tag">&lt;object</span><span class="pln"> <br>&nbsp; &nbsp; </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"convCustomer"</span><span class="pln"> <br>&nbsp; &nbsp; </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"Spring.ConversationWA.Imple.WebConversationSpringState, Spring.ConversationWA"</span><span class="pln"> <br>&nbsp; &nbsp; </span><span class="atn">scope</span><span class="pun">=</span><span class="atv">"session"</span><span class="tag">&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"convCustomer"</span><span class="tag">&gt;&lt;/property&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"TimeOut"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"0"</span><span class="tag">&gt;&lt;/property&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ConversationManager"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"conversationManager"</span><span class="tag">&gt;&lt;/property&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SessionFactory"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"NHibernateSessionFactory"</span><span class="tag">/&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"DbProvider"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"DbProvider"</span><span class="tag">/&gt;</span><span class="pln"><br>&nbsp; </span><span class="com">&lt;!--<br>&nbsp; &nbsp; Using workaround for 'conversation scope' to reference for <br>&nbsp; &nbsp; 'CustomerEditController'. It is not as volatile as "request scope" <br>&nbsp; &nbsp; not as durable as the "session scope"<br>&nbsp; --&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"['CustomerEditController']"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"CustomerEditController"</span><span class="tag">&gt;&lt;/property&gt;</span><span class="pln"><br></span><span class="tag">&lt;/object&gt;</span><span class="pln"><br></span></code></pre></li>
<pre class="default prettyprint"><code><span class="com">&lt;!--<br>&nbsp;Conversation for 'CustomerEditor.aspx', 'CustomerList.aspx', <br>&nbsp;'CustomerOrders.aspx', 'CustomerView.aspx', &nbsp;and 'FulfillmentResult.aspx'<br>--&gt;</span><span class="pln"><br></span><span class="com">&lt;!--<br>&nbsp;Important: If the application had other parties<br>&nbsp;("management employees" for example), they should use another <br>&nbsp;conversation.<br>--&gt;</span><span class="pln"><br></span><span class="tag">&lt;object</span><span class="pln"> <br>&nbsp; &nbsp; </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"convCustomer"</span><span class="pln"> <br>&nbsp; &nbsp; </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"Spring.Web.Conversation.WebConversationSpringState, Spring.Web.Conversation"</span><span class="pln"> <br>&nbsp; &nbsp; </span><span class="atn">scope</span><span class="pun">=</span><span class="atv">"session"</span><span class="tag">&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"convCustomer"</span><span class="tag">&gt;&lt;/property&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"TimeOut"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"0"</span><span class="tag">&gt;&lt;/property&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ConversationManager"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"conversationManager"</span><span class="tag">&gt;&lt;/property&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SessionFactory"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"NHibernateSessionFactory"</span><span class="tag">/&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"DbProvider"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"DbProvider"</span><span class="tag">/&gt;</span><span class="pln"><br>&nbsp; </span><span class="com">&lt;!--<br>&nbsp; &nbsp; Using workaround for 'conversation scope' to reference for <br>&nbsp; &nbsp; 'CustomerEditController'. It is not as volatile as "request scope" <br>&nbsp; &nbsp; not as durable as the "session scope"<br>&nbsp; --&gt;</span><span class="pln"><br>&nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"['CustomerEditController']"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"CustomerEditController"</span><span class="tag">&gt;&lt;/property&gt;</span><span class="pln"><br></span><span class="tag">&lt;/object&gt;</span><span class="pln"><br></span></code></pre></li>
<li><p>Change "CustomerEditController" scope, remove [scope="session"] and put [singleton="false"]:
</p>
@@ -1068,7 +1068,7 @@ that. </p>
<pre class="lang-xml prettyprint"><code><span class="pln">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;object</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"Default.aspx"</span><span class="tag">&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Conversation"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"convDefault"</span><span class="tag">/&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Results"</span><span class="tag">&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;dictionary&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;entry</span><span class="pln"> </span><span class="atn">key</span><span class="pun">=</span><span class="atv">"CustomerList"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"redirect:CustomerList.aspx"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;/dictionary&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;/property&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;/object&gt;</span><span class="pln"><br></span></code></pre>
<pre class="lang-xml prettyprint"><code><span class="pln">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="com">&lt;!--Conversation for 'Default.aspx'--&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="com">&lt;!--<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "convDefault" will have only one functionality: trigger the release<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; of other conversations when started (StartResumeConversation())<br>&nbsp; &nbsp; &nbsp; &nbsp; --&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;object</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"convDefault"</span><span class="pln"> <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"Spring.ConversationWA.Imple.WebConversationSpringState, Spring.ConversationWA"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="atn">scope</span><span class="pun">=</span><span class="atv">"session"</span><span class="tag">&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"convDefault"</span><span class="tag">&gt;&lt;/property&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"TimeOut"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"0"</span><span class="tag">&gt;&lt;/property&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ConversationManager"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"conversationManager"</span><span class="tag">&gt;&lt;/property&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SessionFactory"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"NHibernateSessionFactory"</span><span class="tag">/&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"DbProvider"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"DbProvider"</span><span class="tag">/&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;/object&gt;</span><span class="pln"><br></span></code></pre>
<pre class="lang-xml prettyprint"><code><span class="pln">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="com">&lt;!--Conversation for 'Default.aspx'--&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="com">&lt;!--<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "convDefault" will have only one functionality: trigger the release<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; of other conversations when started (StartResumeConversation())<br>&nbsp; &nbsp; &nbsp; &nbsp; --&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;object</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"convDefault"</span><span class="pln"> <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"Spring.Web.Conversation.WebConversationSpringState, Spring.Web.Conversation"</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="atn">scope</span><span class="pun">=</span><span class="atv">"session"</span><span class="tag">&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"convDefault"</span><span class="tag">&gt;&lt;/property&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"TimeOut"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"0"</span><span class="tag">&gt;&lt;/property&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ConversationManager"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"conversationManager"</span><span class="tag">&gt;&lt;/property&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SessionFactory"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"NHibernateSessionFactory"</span><span class="tag">/&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"DbProvider"</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"DbProvider"</span><span class="tag">/&gt;</span><span class="pln"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="tag">&lt;/object&gt;</span><span class="pln"><br></span></code></pre>
<ul>
<li>Added "ConversationPage.cs". Base page with support for conversation.</li>
@@ -1117,7 +1117,7 @@ IDbCommand execution. This is important because we will do more lazyload
<li><p>Config\Log4Net.xml.
</p>
<pre class="default prettyprint"><code><span class="pun">...</span><span class="pln"><br></span><span class="pun">&lt;!--</span><span class="pln">detail</span><span class="str">'s about SQL'</span><span class="pln">s</span><span class="pun">.</span><span class="pln"> </span><span class="typ">To</span><span class="pln"> view sql commands on </span><span class="typ">Logs</span><span class="pun">\</span><span class="pln">log</span><span class="pun">.</span><span class="pln">txt</span><span class="pun">--&gt;</span><span class="pln"><br></span><span class="pun">&lt;</span><span class="pln">logger name</span><span class="pun">=</span><span class="str">"NHibernate.SQL"</span><span class="pun">&gt;</span><span class="pln"><br>&nbsp; </span><span class="pun">&lt;</span><span class="pln">level value</span><span class="pun">=</span><span class="str">"DEBUG"</span><span class="pln"> </span><span class="pun">/&gt;</span><span class="pln"><br></span><span class="pun">&lt;</span><span class="str">/logger&gt;<br>...<br>&lt;!--detail's about Conversation--&gt;<br>&lt;logger name="Spring.ConversationWA"&gt;<br>&nbsp; &lt;level value="DEBUG" /</span><span class="pun">&gt;</span><span class="pln"><br></span><span class="pun">&lt;/</span><span class="pln">logger</span><span class="pun">&gt;</span><span class="pln"><br></span></code></pre></li>
<pre class="default prettyprint"><code><span class="pun">...</span><span class="pln"><br></span><span class="pun">&lt;!--</span><span class="pln">detail</span><span class="str">'s about SQL'</span><span class="pln">s</span><span class="pun">.</span><span class="pln"> </span><span class="typ">To</span><span class="pln"> view sql commands on </span><span class="typ">Logs</span><span class="pun">\</span><span class="pln">log</span><span class="pun">.</span><span class="pln">txt</span><span class="pun">--&gt;</span><span class="pln"><br></span><span class="pun">&lt;</span><span class="pln">logger name</span><span class="pun">=</span><span class="str">"NHibernate.SQL"</span><span class="pun">&gt;</span><span class="pln"><br>&nbsp; </span><span class="pun">&lt;</span><span class="pln">level value</span><span class="pun">=</span><span class="str">"DEBUG"</span><span class="pln"> </span><span class="pun">/&gt;</span><span class="pln"><br></span><span class="pun">&lt;</span><span class="str">/logger&gt;<br>...<br>&lt;!--detail's about Conversation--&gt;<br>&lt;logger name="Spring.Web.Conversation"&gt;<br>&nbsp; &lt;level value="DEBUG" /</span><span class="pun">&gt;</span><span class="pln"><br></span><span class="pun">&lt;/</span><span class="pln">logger</span><span class="pun">&gt;</span><span class="pln"><br></span></code></pre></li>
</ul>
<p>Hailton de Castro.</p>

View File

@@ -41,9 +41,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\bin\net\4.0\debug\Common.Logging.dll</HintPath>
</Reference>
<Reference Include="Common.Logging.Log4Net, Version=1.2.0.2, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\net\2.0\Common.Logging.Log4Net.dll</HintPath>
<Reference Include="Common.Logging.Log4Net1210">
<HintPath>..\..\lib\net\2.0\Common.Logging.Log4Net1210.dll</HintPath>
</Reference>
<Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>

View File

@@ -20,7 +20,7 @@
</configSections>
<common>
<logging>
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net">
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net1210">
<!-- choices are INLINE, FILE, FILE-WATCH, EXTERNAL-->
<!-- otherwise BasicConfigurer.Configure is used -->
<!-- log4net configuration file is specified with key configFile-->