diff --git a/src/Spring/Spring.ConversationWA.NH32/AssemblyInfo.cs b/src/Spring/Spring.Web.Conversation.NHibernate32/AssemblyInfo.cs similarity index 97% rename from src/Spring/Spring.ConversationWA.NH32/AssemblyInfo.cs rename to src/Spring/Spring.Web.Conversation.NHibernate32/AssemblyInfo.cs index 11ea80a7..5d832ca3 100644 --- a/src/Spring/Spring.ConversationWA.NH32/AssemblyInfo.cs +++ b/src/Spring/Spring.Web.Conversation.NHibernate32/AssemblyInfo.cs @@ -1,25 +1,25 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Reflection; - -[assembly: AssemblyTitle("Spring.ConversationWA.NH32. NHibernate 3.2 support.")] +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Reflection; + +[assembly: AssemblyTitle("Spring.ConversationWA.NH32. NHibernate 3.2 support.")] [assembly: AssemblyDescription("Interfaces and classes that provide 'Conversation Workaround' support in Spring.Net")] \ No newline at end of file diff --git a/src/Spring/Spring.ConversationWA.NH32/ConversationWA/HttpModule/ConversationModule.cs b/src/Spring/Spring.Web.Conversation.NHibernate32/ConversationWA/HttpModule/ConversationModule.cs similarity index 97% rename from src/Spring/Spring.ConversationWA.NH32/ConversationWA/HttpModule/ConversationModule.cs rename to src/Spring/Spring.Web.Conversation.NHibernate32/ConversationWA/HttpModule/ConversationModule.cs index 9ecd5799..8b044a43 100644 --- a/src/Spring/Spring.ConversationWA.NH32/ConversationWA/HttpModule/ConversationModule.cs +++ b/src/Spring/Spring.Web.Conversation.NHibernate32/ConversationWA/HttpModule/ConversationModule.cs @@ -1,173 +1,173 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Collections.Generic; -using System.Text; -using System.Web; -using Spring.Context.Support; -using Common.Logging; -using Spring.Data.NHibernate.Support; -using System.Web.UI; -using Spring.Context; - -namespace Spring.ConversationWA.HttpModule -{ - /// - /// HttpModule for ending Conversations with Timeout exceeded. - /// - /// Hailton de Castro - public class ConversationModule : IHttpModule, IApplicationContextAware - { - private static readonly ILog LOG = LogManager.GetLogger(typeof(ConversationModule)); - - private IList conversationManagerName; - - /// - /// The Names of the s in the - /// - public IList ConversationManagerNameList - { - get { return conversationManagerName; } - set { conversationManagerName = value; } - } - - #region IHttpModule Members - - /// - /// Add PostRequestHandlerExecute event to clear conversations with timeout exceeded. - /// - /// - public void Init(HttpApplication context) - { - context.PreRequestHandlerExecute += context_PreRequestHandlerExecute; - context.PostRequestHandlerExecute += context_PostRequestHandlerExecute; - context.EndRequest += context_EndRequest; - } - - - /// - /// Disposes of the resources (other than memory) used by the module that implements . - /// - public void Dispose() - { - //noop - } - - void context_PreRequestHandlerExecute(object sender, EventArgs e) - { - if (HttpContext.Current.Handler is Page) - { - Page page = (Page)HttpContext.Current.Handler; - page.Unload += new EventHandler(page_Unload); - - if (HttpContext.Current.Session != null) - { - if (LOG.IsDebugEnabled) LOG.Debug("context_PreRequestHandlerExecute: Processing HttpContext.Current.Session"); - foreach (String convMngName in this.ConversationManagerNameList) - { - if (LOG.IsDebugEnabled) LOG.Debug(string.Format("context_PreRequestHandlerExecute: Processing ConversationManager: {0}", convMngName)); - IConversationManager convMng = (IConversationManager)this.applicationContext.GetObject(convMngName); - convMng.EndOnTimeOut(); - convMng.FreeEnded(); - } - } - else - { - if (LOG.IsDebugEnabled) LOG.Debug("context_PreRequestHandlerExecute: no HttpContext.Current.Session found."); - } - } - } - - - /// - /// Handles the Unload event of the page control. - /// - /// The source of the event. - /// The instance containing the event data. - /// - /// Necessary for Redirect or Abort for any reason. - /// - void page_Unload(object sender, EventArgs e) - { - if (LOG.IsDebugEnabled) LOG.Debug("page_Unload HttpContext.Current.Session is null: " + (HttpContext.Current.Session == null)); - foreach (String convMngName in this.ConversationManagerNameList) - { - if (LOG.IsDebugEnabled) LOG.Debug(string.Format("page_Unload: Processing ConversationManager: {0}", convMngName)); - IConversationManager convMng = (IConversationManager)this.applicationContext.GetObject(convMngName); - convMng.EndOnTimeOut(); - convMng.FreeEnded(); - convMng.PauseConversations(); - } - } - - void context_EndRequest(object sender, EventArgs e) - { - if (LOG.IsDebugEnabled) LOG.Debug("context_EndRequest HttpContext.Current.Session is null: " + (HttpContext.Current.Session == null)); - } - - void context_PostRequestHandlerExecute(object sender, EventArgs e) - { - if (LOG.IsDebugEnabled) LOG.Debug("context_PostRequestHandlerExecute HttpContext.Current.Session is null: " + (HttpContext.Current.Session == null)); - if (HttpContext.Current.Session != null) - { - } - } - - #endregion - - #region IApplicationContextAware Members - private IApplicationContext applicationContext; - - /// - /// Sets the that this - /// object runs in. - /// - /// - /// - ///

- /// Used to obtain the instances of - ///

- ///

- /// Invoked after population of normal object properties but before an - /// init callback such as - /// 's - /// - /// or a custom init-method. Invoked after the setting of any - /// 's - /// - /// property. - ///

- ///
- /// - /// In the case of application context initialization errors. - /// - /// - /// If thrown by any application context methods. - /// - /// - public IApplicationContext ApplicationContext - { - set { this.applicationContext = value; } - } - - #endregion - } -} +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; +using System.Web; +using Spring.Context.Support; +using Common.Logging; +using Spring.Data.NHibernate.Support; +using System.Web.UI; +using Spring.Context; + +namespace Spring.ConversationWA.HttpModule +{ + /// + /// HttpModule for ending Conversations with Timeout exceeded. + /// + /// Hailton de Castro + public class ConversationModule : IHttpModule, IApplicationContextAware + { + private static readonly ILog LOG = LogManager.GetLogger(typeof(ConversationModule)); + + private IList conversationManagerName; + + /// + /// The Names of the s in the + /// + public IList ConversationManagerNameList + { + get { return conversationManagerName; } + set { conversationManagerName = value; } + } + + #region IHttpModule Members + + /// + /// Add PostRequestHandlerExecute event to clear conversations with timeout exceeded. + /// + /// + public void Init(HttpApplication context) + { + context.PreRequestHandlerExecute += context_PreRequestHandlerExecute; + context.PostRequestHandlerExecute += context_PostRequestHandlerExecute; + context.EndRequest += context_EndRequest; + } + + + /// + /// Disposes of the resources (other than memory) used by the module that implements . + /// + public void Dispose() + { + //noop + } + + void context_PreRequestHandlerExecute(object sender, EventArgs e) + { + if (HttpContext.Current.Handler is Page) + { + Page page = (Page)HttpContext.Current.Handler; + page.Unload += new EventHandler(page_Unload); + + if (HttpContext.Current.Session != null) + { + if (LOG.IsDebugEnabled) LOG.Debug("context_PreRequestHandlerExecute: Processing HttpContext.Current.Session"); + foreach (String convMngName in this.ConversationManagerNameList) + { + if (LOG.IsDebugEnabled) LOG.Debug(string.Format("context_PreRequestHandlerExecute: Processing ConversationManager: {0}", convMngName)); + IConversationManager convMng = (IConversationManager)this.applicationContext.GetObject(convMngName); + convMng.EndOnTimeOut(); + convMng.FreeEnded(); + } + } + else + { + if (LOG.IsDebugEnabled) LOG.Debug("context_PreRequestHandlerExecute: no HttpContext.Current.Session found."); + } + } + } + + + /// + /// Handles the Unload event of the page control. + /// + /// The source of the event. + /// The instance containing the event data. + /// + /// Necessary for Redirect or Abort for any reason. + /// + void page_Unload(object sender, EventArgs e) + { + if (LOG.IsDebugEnabled) LOG.Debug("page_Unload HttpContext.Current.Session is null: " + (HttpContext.Current.Session == null)); + foreach (String convMngName in this.ConversationManagerNameList) + { + if (LOG.IsDebugEnabled) LOG.Debug(string.Format("page_Unload: Processing ConversationManager: {0}", convMngName)); + IConversationManager convMng = (IConversationManager)this.applicationContext.GetObject(convMngName); + convMng.EndOnTimeOut(); + convMng.FreeEnded(); + convMng.PauseConversations(); + } + } + + void context_EndRequest(object sender, EventArgs e) + { + if (LOG.IsDebugEnabled) LOG.Debug("context_EndRequest HttpContext.Current.Session is null: " + (HttpContext.Current.Session == null)); + } + + void context_PostRequestHandlerExecute(object sender, EventArgs e) + { + if (LOG.IsDebugEnabled) LOG.Debug("context_PostRequestHandlerExecute HttpContext.Current.Session is null: " + (HttpContext.Current.Session == null)); + if (HttpContext.Current.Session != null) + { + } + } + + #endregion + + #region IApplicationContextAware Members + private IApplicationContext applicationContext; + + /// + /// Sets the that this + /// object runs in. + /// + /// + /// + ///

+ /// Used to obtain the instances of + ///

+ ///

+ /// Invoked after population of normal object properties but before an + /// init callback such as + /// 's + /// + /// or a custom init-method. Invoked after the setting of any + /// 's + /// + /// property. + ///

+ ///
+ /// + /// In the case of application context initialization errors. + /// + /// + /// If thrown by any application context methods. + /// + /// + public IApplicationContext ApplicationContext + { + set { this.applicationContext = value; } + } + + #endregion + } +} diff --git a/src/Spring/Spring.ConversationWA.NH32/ConversationWA/IConversationManager.cs b/src/Spring/Spring.Web.Conversation.NHibernate32/ConversationWA/IConversationManager.cs similarity index 97% rename from src/Spring/Spring.ConversationWA.NH32/ConversationWA/IConversationManager.cs rename to src/Spring/Spring.Web.Conversation.NHibernate32/ConversationWA/IConversationManager.cs index f43c6e17..754b5f0b 100644 --- a/src/Spring/Spring.ConversationWA.NH32/ConversationWA/IConversationManager.cs +++ b/src/Spring/Spring.Web.Conversation.NHibernate32/ConversationWA/IConversationManager.cs @@ -1,112 +1,112 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Collections.Generic; -using System.Text; -using NHibernate; - -namespace Spring.ConversationWA -{ - /// - /// manager for Conversations. - /// - /// Hailton de Castro - public interface IConversationManager - { - /// - /// Returns the conversation if it is still alive, otherwise it returns null. - /// - /// - /// - IConversationState GetConversationById(String id); - - /// - /// Ends all conversations with the timeout exceeded. - /// - void EndOnTimeOut(); - - /// - /// Close IDbConnections for that - /// use 'session-per-conversation'. It calls - /// in all conversations. - /// - void PauseConversations(); - - /// - /// Release the ended conversations And removes them. - /// If the conversation supports 'session-per-conversation', also close the session. - /// - void FreeEnded(); - - /// - /// Add conversation. If is null - /// it resolves to 'this'. - /// - /// - /// - /// If already has another manager. - /// - void AddConversation(IConversationState conversation); - - /// - /// Makes the 'root conversation' of - /// the current active conversation and open/reopen the - /// if - /// the conversation supports 'session-per-conversation'. Close all - /// the connection for all session before. - /// If is true will end all - /// paused conversations. - /// - void SetActiveConversation(IConversationState conversation); - - /// - /// Returns the active conversation if exists, otherwise returns null. - /// It depends on - /// - /// - IConversationState ActiveConversation{ get; } - - /// - /// If this is non-null run pattern 'session-per-conversation'. - /// Must be the same SessionFactory of the managed conversations. - /// - /// - ISessionFactory SessionFactory { get; } - - /// - /// Ends the "paused conversations" in call to . - /// Important: Unexpected behavior may occur if there are nested conversations, - /// as in only the current conversation and its parents - /// are started, the 'conversations children' remain paused, so these will be ended. - /// Defaul value: false. - /// - /// - /// When it is true, "start/resume a conversation" will cause the other to be - /// ended and cleaned up. - /// - /// This is useful to avoid memory leak where there are many conversations. - /// This leak can be very considerable, as the conversation may keep a "NHibernate session" - /// that can contain many objects in its cache from the database queries. - /// - /// - bool EndPaused { get; set; } - } -} +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; +using NHibernate; + +namespace Spring.ConversationWA +{ + /// + /// manager for Conversations. + /// + /// Hailton de Castro + public interface IConversationManager + { + /// + /// Returns the conversation if it is still alive, otherwise it returns null. + /// + /// + /// + IConversationState GetConversationById(String id); + + /// + /// Ends all conversations with the timeout exceeded. + /// + void EndOnTimeOut(); + + /// + /// Close IDbConnections for that + /// use 'session-per-conversation'. It calls + /// in all conversations. + /// + void PauseConversations(); + + /// + /// Release the ended conversations And removes them. + /// If the conversation supports 'session-per-conversation', also close the session. + /// + void FreeEnded(); + + /// + /// Add conversation. If is null + /// it resolves to 'this'. + /// + /// + /// + /// If already has another manager. + /// + void AddConversation(IConversationState conversation); + + /// + /// Makes the 'root conversation' of + /// the current active conversation and open/reopen the + /// if + /// the conversation supports 'session-per-conversation'. Close all + /// the connection for all session before. + /// If is true will end all + /// paused conversations. + /// + void SetActiveConversation(IConversationState conversation); + + /// + /// Returns the active conversation if exists, otherwise returns null. + /// It depends on + /// + /// + IConversationState ActiveConversation{ get; } + + /// + /// If this is non-null run pattern 'session-per-conversation'. + /// Must be the same SessionFactory of the managed conversations. + /// + /// + ISessionFactory SessionFactory { get; } + + /// + /// Ends the "paused conversations" in call to . + /// Important: Unexpected behavior may occur if there are nested conversations, + /// as in only the current conversation and its parents + /// are started, the 'conversations children' remain paused, so these will be ended. + /// Defaul value: false. + /// + /// + /// When it is true, "start/resume a conversation" will cause the other to be + /// ended and cleaned up. + /// + /// This is useful to avoid memory leak where there are many conversations. + /// This leak can be very considerable, as the conversation may keep a "NHibernate session" + /// that can contain many objects in its cache from the database queries. + /// + /// + bool EndPaused { get; set; } + } +} diff --git a/src/Spring/Spring.ConversationWA.NH32/ConversationWA/IConversationState.cs b/src/Spring/Spring.Web.Conversation.NHibernate32/ConversationWA/IConversationState.cs similarity index 97% rename from src/Spring/Spring.ConversationWA.NH32/ConversationWA/IConversationState.cs rename to src/Spring/Spring.Web.Conversation.NHibernate32/ConversationWA/IConversationState.cs index 89db3c59..028f40b6 100644 --- a/src/Spring/Spring.ConversationWA.NH32/ConversationWA/IConversationState.cs +++ b/src/Spring/Spring.Web.Conversation.NHibernate32/ConversationWA/IConversationState.cs @@ -1,192 +1,192 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Data; -using System.Configuration; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using System.Collections.Generic; -using System.Collections; -using NHibernate; -using Spring.Data.Common; - -namespace Spring.ConversationWA -{ - /// - /// Port to conversation. If the object is not found in the current - /// conversation, will be tried on the parent if the parent is - /// not null. - /// - /// - /// If is different from spring name for this instance. - /// - /// Hailton de Castro - public interface IConversationState: IDictionary - { - /// - /// Conversation id. - /// - String Id { get; set; } - - /// - /// Starts or resumes the conversation and the . - /// If is not null, so - /// is called to - /// Raise SessionHolder for make the reconnection. - /// - /// Make return false. - /// - /// Update the . - /// - /// - /// - /// - /// If this conversation is ended. - /// - /// If is not null and - /// different from - /// - /// - /// - /// - void StartResumeConversation(); - - /// - /// Return true until is called. - /// - bool IsNew { get; } - - /// - /// Ends the conversation. End each of the 'inner conversations' in - /// . Returns false if the - /// conversation and all of - /// has already been ended. - /// - /// - /// - /// - /// If . - /// Session["spring.objects"] - /// is null. - /// - /// The 'spring session scopes' are not located in the key - /// 'spring.objects' of HttpSessionState. - /// - /// - /// - void EndConversation(); - - /// - /// Return true if this conversation is ended. - /// - bool Ended { get; } - - /// - /// Inner conversation. After added if the - /// is null it will resolve to 'this'. - /// - /// at - /// , - /// , - /// - /// if Circular Dependency is detected. - IList InnerConversations { get; } - - /// - /// Conversation parent. - /// - /// - /// - /// If this conversation already has a different parent. - /// - /// If this Conversation is not new. - /// - /// If Circular Dependency is detected. - /// - /// The Parent conversation is not new. - /// - /// - /// - IConversationState ParentConversation { get; set;} - - /// - /// TimeOut for the conversation in milliseconds. - /// If 0 TimeOut will be ignored. - /// - Int32 TimeOut { get; set; } - - /// - /// Last acces for a value into this Conversation or Inner Conversation. - /// Reset to DateTime.Now each time - /// is called. - /// - DateTime LastAccess { get; set; } - - /// - /// Conversation Manager. When this is setted if - /// - /// returns null so AddConversation is called. - /// - IConversationManager ConversationManager { get; set; } - - /// - /// that is stored in the root conversation. - /// - /// - /// must support 'session-per-conversation'. - /// - /// - ISession RootSessionPerConversation { get; set; } - - /// - /// If this is non-null run pattern 'session-per-conversation'. - /// It also depends on and . - /// must support ConversationManager. - /// - /// - ISessionFactory SessionFactory { get; } - - /// - /// If this is non-null run pattern 'session-per-conversation'. - /// It also depends on and . - /// must support ConversationManager. - /// - /// - IDbProvider DbProvider { get; } - - /// - /// Indicates that the conversation is paused. - /// - bool IsPaused { get; } - - /// - /// Starts or resumes the conversation and each 'inner conversation' in - /// . - /// It is not about 'Session-per-conversation' because it is done by - /// . - /// - void PauseConversation(); - } -} +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Data; +using System.Configuration; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Collections.Generic; +using System.Collections; +using NHibernate; +using Spring.Data.Common; + +namespace Spring.ConversationWA +{ + /// + /// Port to conversation. If the object is not found in the current + /// conversation, will be tried on the parent if the parent is + /// not null. + /// + /// + /// If is different from spring name for this instance. + /// + /// Hailton de Castro + public interface IConversationState: IDictionary + { + /// + /// Conversation id. + /// + String Id { get; set; } + + /// + /// Starts or resumes the conversation and the . + /// If is not null, so + /// is called to + /// Raise SessionHolder for make the reconnection. + /// + /// Make return false. + /// + /// Update the . + /// + /// + /// + /// + /// If this conversation is ended. + /// + /// If is not null and + /// different from + /// + /// + /// + /// + void StartResumeConversation(); + + /// + /// Return true until is called. + /// + bool IsNew { get; } + + /// + /// Ends the conversation. End each of the 'inner conversations' in + /// . Returns false if the + /// conversation and all of + /// has already been ended. + /// + /// + /// + /// + /// If . + /// Session["spring.objects"] + /// is null. + /// + /// The 'spring session scopes' are not located in the key + /// 'spring.objects' of HttpSessionState. + /// + /// + /// + void EndConversation(); + + /// + /// Return true if this conversation is ended. + /// + bool Ended { get; } + + /// + /// Inner conversation. After added if the + /// is null it will resolve to 'this'. + /// + /// at + /// , + /// , + /// + /// if Circular Dependency is detected. + IList InnerConversations { get; } + + /// + /// Conversation parent. + /// + /// + /// + /// If this conversation already has a different parent. + /// + /// If this Conversation is not new. + /// + /// If Circular Dependency is detected. + /// + /// The Parent conversation is not new. + /// + /// + /// + IConversationState ParentConversation { get; set;} + + /// + /// TimeOut for the conversation in milliseconds. + /// If 0 TimeOut will be ignored. + /// + Int32 TimeOut { get; set; } + + /// + /// Last acces for a value into this Conversation or Inner Conversation. + /// Reset to DateTime.Now each time + /// is called. + /// + DateTime LastAccess { get; set; } + + /// + /// Conversation Manager. When this is setted if + /// + /// returns null so AddConversation is called. + /// + IConversationManager ConversationManager { get; set; } + + /// + /// that is stored in the root conversation. + /// + /// + /// must support 'session-per-conversation'. + /// + /// + ISession RootSessionPerConversation { get; set; } + + /// + /// If this is non-null run pattern 'session-per-conversation'. + /// It also depends on and . + /// must support ConversationManager. + /// + /// + ISessionFactory SessionFactory { get; } + + /// + /// If this is non-null run pattern 'session-per-conversation'. + /// It also depends on and . + /// must support ConversationManager. + /// + /// + IDbProvider DbProvider { get; } + + /// + /// Indicates that the conversation is paused. + /// + bool IsPaused { get; } + + /// + /// Starts or resumes the conversation and each 'inner conversation' in + /// . + /// It is not about 'Session-per-conversation' because it is done by + /// . + /// + void PauseConversation(); + } +} diff --git a/src/Spring/Spring.ConversationWA.NH32/ConversationWA/Impl/InnerConversationList.cs b/src/Spring/Spring.Web.Conversation.NHibernate32/ConversationWA/Impl/InnerConversationList.cs similarity index 100% rename from src/Spring/Spring.ConversationWA.NH32/ConversationWA/Impl/InnerConversationList.cs rename to src/Spring/Spring.Web.Conversation.NHibernate32/ConversationWA/Impl/InnerConversationList.cs diff --git a/src/Spring/Spring.ConversationWA.NH32/ConversationWA/Impl/WebConversationManager.cs b/src/Spring/Spring.Web.Conversation.NHibernate32/ConversationWA/Impl/WebConversationManager.cs similarity index 100% rename from src/Spring/Spring.ConversationWA.NH32/ConversationWA/Impl/WebConversationManager.cs rename to src/Spring/Spring.Web.Conversation.NHibernate32/ConversationWA/Impl/WebConversationManager.cs diff --git a/src/Spring/Spring.ConversationWA.NH32/ConversationWA/Impl/WebConversationSpringState.cs b/src/Spring/Spring.Web.Conversation.NHibernate32/ConversationWA/Impl/WebConversationSpringState.cs similarity index 100% rename from src/Spring/Spring.ConversationWA.NH32/ConversationWA/Impl/WebConversationSpringState.cs rename to src/Spring/Spring.Web.Conversation.NHibernate32/ConversationWA/Impl/WebConversationSpringState.cs diff --git a/src/Spring/Spring.ConversationWA.NH32/Data/NHibernate/Support/SessionPerConversationScope.cs b/src/Spring/Spring.Web.Conversation.NHibernate32/Data/NHibernate/Support/SessionPerConversationScope.cs similarity index 97% rename from src/Spring/Spring.ConversationWA.NH32/Data/NHibernate/Support/SessionPerConversationScope.cs rename to src/Spring/Spring.Web.Conversation.NHibernate32/Data/NHibernate/Support/SessionPerConversationScope.cs index fc4fb0b3..1668c315 100644 --- a/src/Spring/Spring.ConversationWA.NH32/Data/NHibernate/Support/SessionPerConversationScope.cs +++ b/src/Spring/Spring.Web.Conversation.NHibernate32/Data/NHibernate/Support/SessionPerConversationScope.cs @@ -1,450 +1,450 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -#region Imports - -using System; -using System.Diagnostics; -using System.Reflection; -using System.Text; -using Common.Logging; -using NHibernate; -using Spring.Threading; -using Spring.Transaction.Support; -using Spring.Util; -using System.Data; -using Spring.ConversationWA; -using System.Collections.Generic; - -#endregion - -namespace Spring.Data.NHibernate.Support -{ - /// - ///Based on - /// for support of 'session-per-conversation' pattern. - /// - ///Hailton de Castro - [Serializable] - public class SessionPerConversationScope : IDisposable - { - #region Fields - - /// - /// The logging instance. - /// - protected readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - private readonly SessionPerConversationScopeSettings settings; - - // Keys into LogicalThreadContext for runtime values. - private readonly string ISOPEN_KEY; - private readonly string OPENER_CONVERSATION_ID_KEY; - - #endregion - - #region Constructor (s) - - /// - /// Initializes a new instance of the class. - /// Uses default values for - /// - public SessionPerConversationScope() - : this(new SessionPerConversationScopeSettings()) - { - // noop - } - - /// - /// Initializes a new instance of the class. - /// - /// Specify the to be set on each session provided by this instance. - /// Specify the flushmode to be applied on each session provided by this instance. - /// - public SessionPerConversationScope(IInterceptor entityInterceptor, FlushMode defaultFlushMode) - : this(new SessionPerConversationScopeSettings(entityInterceptor, defaultFlushMode)) - { - // noop - } - - /// - /// Initializes a new instance of the class. - /// - /// An instance holding the scope configuration - public SessionPerConversationScope(SessionPerConversationScopeSettings settings) - { - log = LogManager.GetLogger(this.GetType()); - this.settings = settings; - - ISOPEN_KEY = UniqueKey.GetInstanceScopedString(this, "IsOpen"); - OPENER_CONVERSATION_ID_KEY = UniqueKey.GetInstanceScopedString(this, "OpenerConversationId"); - } - - #endregion - - #region Properties - - /// - /// Gets the flushmode to be applied on each newly created session. - /// - /// - /// This property defaults to to ensure that modifying objects outside the boundaries - /// of a transaction will not be persisted. It is recommended to not change this value but wrap any modifying operation - /// within a transaction. - /// - public FlushMode DefaultFlushMode - { - get { return settings.DefaultFlushMode; } - } - - /// - /// Get the configured EntityInterceptor - /// - public IInterceptor EntityInterceptor - { - get - { - return settings.EntityInterceptor; - } - } - - /// - /// Id for conversation that open the Session. - /// - public String OpenerConversationId - { - get - { - return (String)LogicalThreadContext.GetData(OPENER_CONVERSATION_ID_KEY); - } - set - { - LogicalThreadContext.SetData(OPENER_CONVERSATION_ID_KEY, value); - } - } - - /// - /// Gets a flag, whether this scope is in "open" state on the current logical thread. - /// - public bool IsOpen - { - get - { - return (null != LogicalThreadContext.GetData(ISOPEN_KEY)); - } - } - - /// - /// Sets a flag, whether this scope is in "open" state on the current logical thread. - /// - /// - private void SetOpen(bool isOpen) - { - if (isOpen) - { - LogicalThreadContext.SetData(ISOPEN_KEY, ISOPEN_KEY); - } - else - { - LogicalThreadContext.FreeNamedDataSlot(ISOPEN_KEY); - } - } - - #endregion - - #region IDisposable Members - - /// - /// NOOP. - /// - public virtual void Dispose() - { - //no OP - } - - #endregion - - #region Methods - - /// - /// Open a new session or reconect the - /// in . - /// Participating in an existing session registed with - /// is not alowed. - /// - /// - /// - /// - /// - /// If there is another conversation with a with opened - /// . - /// If attempting to participate in an existing NHibernate - /// managed by . - /// - /// - /// - public void Open(IConversationState activeConversation, ICollection allManagedConversation) - { - bool isDebugEnabled = log.IsDebugEnabled; - - if (IsOpen) - { - if (activeConversation.Id != this.OpenerConversationId) - { - throw new InvalidOperationException("There is another conversation with a ISession with opened IDbConnection."); - } - else - { - if (isDebugEnabled) log.Debug(String.Format("SessionPerConversationScope is already open for this conversation: Id:'{0}'.", activeConversation.Id)); - } - } - else - { - if (activeConversation.SessionFactory != null) - { - if (isDebugEnabled) log.Debug(String.Format("activeConversation with 'session-per-conversation': Id:'{0}'.", activeConversation.Id)); - - // single session mode - if (TransactionSynchronizationManager.HasResource(activeConversation.SessionFactory)) - { - // Do not modify the Session: just set the participate flag. - if (isDebugEnabled) log.Debug("Participating in existing NHibernate SessionFactory IS NOT ALLOWED."); - throw new InvalidOperationException("Participating in existing NHibernate SessionFactory IS NOT ALLOWED."); - } - else - { - if (isDebugEnabled) log.Debug("Opening single NHibernate Session in SessionPerConversationScope"); - TransactionSynchronizationManager.BindResource(activeConversation.SessionFactory, new LazySessionPerConversationHolder(this, activeConversation, allManagedConversation)); - - SetOpen(true); - this.OpenerConversationId = activeConversation.Id; - } - } - else - { - if (isDebugEnabled) log.Debug(String.Format("activeConversation with NO 'session-per-conversation': Id:'{0}'.", activeConversation.Id)); - } - } - } - - /// - /// Close the current view's session and unregisters - /// from . - /// - /// The session factory that on use - /// A list of conversations which the session can be closed or disconnected - /// - /// - /// If start/resume a conversation from a - /// when exists a different - /// with open registered on - /// - /// If the holder on , is not a . - /// - /// - public void Close(ISessionFactory sessionFactory, ICollection allManagedConversation) - { - bool isDebugEnabled = log.IsDebugEnabled; - if (isDebugEnabled) log.Debug("Trying to close SessionPerConversationScope"); - - if (IsOpen) - { - try - { - DoClose(sessionFactory, allManagedConversation, isDebugEnabled); - } - finally - { - SetOpen(false); - this.OpenerConversationId = null; - } - } - else - { - if (isDebugEnabled) log.Debug("No open conversation - doing nothing"); - } - } - - private void DoClose(ISessionFactory sessionFactory, ICollection allManagedConversation, bool isLogDebugEnabled) - { - // single session mode - if (isLogDebugEnabled) log.Debug("DoClose: Closing SessionPerConversationScope"); - Object holderObj = TransactionSynchronizationManager.UnbindResource(sessionFactory); - if (holderObj != null) - { - if (holderObj is LazySessionPerConversationHolder) - { - LazySessionPerConversationHolder holder = (LazySessionPerConversationHolder)holderObj; - if (holder.Owner == this) - { - holder.CloseAll(); - } - else - { - throw new InvalidOperationException( - "Can not close session beacause 'holder owner' is not 'this'." + - " You are trying to start/resume a conversation from a" + - " IConversationManager when exists a diferent IConversationManager " + - " with open ISession registered on TransactionSynchronizationManager."); - } - } - else - { - throw new InvalidOperationException("Can not close session beacause holder, on TransactionSynchronizationManager, is not a LazySessionPerConversationHolder."); - } - } - else - { - if (isLogDebugEnabled) log.Warn("DoClose: TransactionSynchronizationManager.UnbindResource(sessionFactory) has no SessionHolder. Should I throw error?"); - } - } - - private void DoOpenSession(IConversationState conversation) - { - lock (this) - { - ISession session = null; - if (conversation.RootSessionPerConversation == null) - { - //new session - session = ( - (EntityInterceptor != null) - ? conversation.SessionFactory.OpenSession(EntityInterceptor) - : conversation.SessionFactory.OpenSession() - ); - conversation.RootSessionPerConversation = session; - } - else - { - //reconnect existing one. - if (conversation.DbProvider != null) - { - if (log.IsDebugEnabled) log.Debug(String.Format("DoOpenSession: Conversation has a DbProvider: Id='{0}'", conversation.Id)); - if (!conversation.RootSessionPerConversation.IsConnected) - { - if (log.IsDebugEnabled) log.Debug(String.Format("DoOpenSession: Conversation is not Connected: Id='{0}'", conversation.Id)); - - IDbConnection connection = conversation.DbProvider.CreateConnection(); - connection.Open(); - - conversation.RootSessionPerConversation.Reconnect(connection); - } - else - { - if (log.IsDebugEnabled) log.Debug(String.Format("DoOpenSession: Conversation is already Connected: Id='{0}'", conversation.Id)); - } - } - else - { - if (log.IsDebugEnabled) log.Debug(String.Format("DoOpenSession: Conversation has NO DbProvider: Id='{0}'", conversation.Id)); - conversation.RootSessionPerConversation.Reconnect(); - } - session = conversation.RootSessionPerConversation; - } - session.FlushMode = DefaultFlushMode; - } - } - - #endregion - - #region LazySessionPerConversationHolder utility class - - - /// - /// This sessionHolder creates a session for the active conversation only if it is - /// needed (). - /// - /// - /// Although a NHibernateSession defers creation of db-connections until they are really - /// needed, instantiation a session is still more expensive than using LazySessionHolder. - /// - private class LazySessionPerConversationHolder : SessionHolder - { - private readonly ILog log = LogManager.GetLogger(typeof(LazySessionPerConversationHolder)); - private SessionPerConversationScope owner; - public SessionPerConversationScope Owner - { - get { return owner; } - } - IConversationState activeConversation; - ICollection allManagedConversation; - - /// - /// Initialize a new instance. - /// - public LazySessionPerConversationHolder(SessionPerConversationScope owner, IConversationState activeConversation, ICollection allManagedConversation) - { - if (log.IsDebugEnabled) log.Debug("Created LazyReconnectableSessionHolder"); - this.owner = owner; - this.activeConversation = activeConversation; - this.allManagedConversation = allManagedConversation; - } - - /// - /// Create a new session on demand - /// - protected override void EnsureInitialized() - { - if (this.activeConversation.RootSessionPerConversation == null || !this.activeConversation.RootSessionPerConversation.IsConnected) - { - if (log.IsDebugEnabled) log.Debug("EnsureInitialized: 'session-per-conversation' instance requested - opening new session"); - owner.DoOpenSession(this.activeConversation); - AddSession(this.activeConversation.RootSessionPerConversation); - } - } - - public void CloseAll() - { - foreach (IConversationState conversation in this.allManagedConversation) - { - this.CloseConversation(conversation); - } - owner = null; - this.activeConversation = null; - this.allManagedConversation = null; - - if (log.IsDebugEnabled) log.Debug("CloseAll LazySessionPerConversationHolder"); - } - - private void CloseConversation(IConversationState conversation) - { - if (log.IsDebugEnabled) log.Debug(String.Format("CloseConversation: Id='{0}'", conversation.Id)); - if (conversation.RootSessionPerConversation != null) - { - ISession tmpSession = conversation.RootSessionPerConversation; - if (conversation.Ended) - { - SessionFactoryUtils.CloseSession(tmpSession); - conversation.RootSessionPerConversation = null; - } - else - { - if (tmpSession.IsConnected) - tmpSession.Disconnect(); - } - RemoveSession(tmpSession); - } - if (log.IsDebugEnabled) log.Debug("Closed LazySessionPerConversationHolder"); - } - } - - #endregion - } +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +#region Imports + +using System; +using System.Diagnostics; +using System.Reflection; +using System.Text; +using Common.Logging; +using NHibernate; +using Spring.Threading; +using Spring.Transaction.Support; +using Spring.Util; +using System.Data; +using Spring.ConversationWA; +using System.Collections.Generic; + +#endregion + +namespace Spring.Data.NHibernate.Support +{ + /// + ///Based on + /// for support of 'session-per-conversation' pattern. + /// + ///Hailton de Castro + [Serializable] + public class SessionPerConversationScope : IDisposable + { + #region Fields + + /// + /// The logging instance. + /// + protected readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + private readonly SessionPerConversationScopeSettings settings; + + // Keys into LogicalThreadContext for runtime values. + private readonly string ISOPEN_KEY; + private readonly string OPENER_CONVERSATION_ID_KEY; + + #endregion + + #region Constructor (s) + + /// + /// Initializes a new instance of the class. + /// Uses default values for + /// + public SessionPerConversationScope() + : this(new SessionPerConversationScopeSettings()) + { + // noop + } + + /// + /// Initializes a new instance of the class. + /// + /// Specify the to be set on each session provided by this instance. + /// Specify the flushmode to be applied on each session provided by this instance. + /// + public SessionPerConversationScope(IInterceptor entityInterceptor, FlushMode defaultFlushMode) + : this(new SessionPerConversationScopeSettings(entityInterceptor, defaultFlushMode)) + { + // noop + } + + /// + /// Initializes a new instance of the class. + /// + /// An instance holding the scope configuration + public SessionPerConversationScope(SessionPerConversationScopeSettings settings) + { + log = LogManager.GetLogger(this.GetType()); + this.settings = settings; + + ISOPEN_KEY = UniqueKey.GetInstanceScopedString(this, "IsOpen"); + OPENER_CONVERSATION_ID_KEY = UniqueKey.GetInstanceScopedString(this, "OpenerConversationId"); + } + + #endregion + + #region Properties + + /// + /// Gets the flushmode to be applied on each newly created session. + /// + /// + /// This property defaults to to ensure that modifying objects outside the boundaries + /// of a transaction will not be persisted. It is recommended to not change this value but wrap any modifying operation + /// within a transaction. + /// + public FlushMode DefaultFlushMode + { + get { return settings.DefaultFlushMode; } + } + + /// + /// Get the configured EntityInterceptor + /// + public IInterceptor EntityInterceptor + { + get + { + return settings.EntityInterceptor; + } + } + + /// + /// Id for conversation that open the Session. + /// + public String OpenerConversationId + { + get + { + return (String)LogicalThreadContext.GetData(OPENER_CONVERSATION_ID_KEY); + } + set + { + LogicalThreadContext.SetData(OPENER_CONVERSATION_ID_KEY, value); + } + } + + /// + /// Gets a flag, whether this scope is in "open" state on the current logical thread. + /// + public bool IsOpen + { + get + { + return (null != LogicalThreadContext.GetData(ISOPEN_KEY)); + } + } + + /// + /// Sets a flag, whether this scope is in "open" state on the current logical thread. + /// + /// + private void SetOpen(bool isOpen) + { + if (isOpen) + { + LogicalThreadContext.SetData(ISOPEN_KEY, ISOPEN_KEY); + } + else + { + LogicalThreadContext.FreeNamedDataSlot(ISOPEN_KEY); + } + } + + #endregion + + #region IDisposable Members + + /// + /// NOOP. + /// + public virtual void Dispose() + { + //no OP + } + + #endregion + + #region Methods + + /// + /// Open a new session or reconect the + /// in . + /// Participating in an existing session registed with + /// is not alowed. + /// + /// + /// + /// + /// + /// If there is another conversation with a with opened + /// . + /// If attempting to participate in an existing NHibernate + /// managed by . + /// + /// + /// + public void Open(IConversationState activeConversation, ICollection allManagedConversation) + { + bool isDebugEnabled = log.IsDebugEnabled; + + if (IsOpen) + { + if (activeConversation.Id != this.OpenerConversationId) + { + throw new InvalidOperationException("There is another conversation with a ISession with opened IDbConnection."); + } + else + { + if (isDebugEnabled) log.Debug(String.Format("SessionPerConversationScope is already open for this conversation: Id:'{0}'.", activeConversation.Id)); + } + } + else + { + if (activeConversation.SessionFactory != null) + { + if (isDebugEnabled) log.Debug(String.Format("activeConversation with 'session-per-conversation': Id:'{0}'.", activeConversation.Id)); + + // single session mode + if (TransactionSynchronizationManager.HasResource(activeConversation.SessionFactory)) + { + // Do not modify the Session: just set the participate flag. + if (isDebugEnabled) log.Debug("Participating in existing NHibernate SessionFactory IS NOT ALLOWED."); + throw new InvalidOperationException("Participating in existing NHibernate SessionFactory IS NOT ALLOWED."); + } + else + { + if (isDebugEnabled) log.Debug("Opening single NHibernate Session in SessionPerConversationScope"); + TransactionSynchronizationManager.BindResource(activeConversation.SessionFactory, new LazySessionPerConversationHolder(this, activeConversation, allManagedConversation)); + + SetOpen(true); + this.OpenerConversationId = activeConversation.Id; + } + } + else + { + if (isDebugEnabled) log.Debug(String.Format("activeConversation with NO 'session-per-conversation': Id:'{0}'.", activeConversation.Id)); + } + } + } + + /// + /// Close the current view's session and unregisters + /// from . + /// + /// The session factory that on use + /// A list of conversations which the session can be closed or disconnected + /// + /// + /// If start/resume a conversation from a + /// when exists a different + /// with open registered on + /// + /// If the holder on , is not a . + /// + /// + public void Close(ISessionFactory sessionFactory, ICollection allManagedConversation) + { + bool isDebugEnabled = log.IsDebugEnabled; + if (isDebugEnabled) log.Debug("Trying to close SessionPerConversationScope"); + + if (IsOpen) + { + try + { + DoClose(sessionFactory, allManagedConversation, isDebugEnabled); + } + finally + { + SetOpen(false); + this.OpenerConversationId = null; + } + } + else + { + if (isDebugEnabled) log.Debug("No open conversation - doing nothing"); + } + } + + private void DoClose(ISessionFactory sessionFactory, ICollection allManagedConversation, bool isLogDebugEnabled) + { + // single session mode + if (isLogDebugEnabled) log.Debug("DoClose: Closing SessionPerConversationScope"); + Object holderObj = TransactionSynchronizationManager.UnbindResource(sessionFactory); + if (holderObj != null) + { + if (holderObj is LazySessionPerConversationHolder) + { + LazySessionPerConversationHolder holder = (LazySessionPerConversationHolder)holderObj; + if (holder.Owner == this) + { + holder.CloseAll(); + } + else + { + throw new InvalidOperationException( + "Can not close session beacause 'holder owner' is not 'this'." + + " You are trying to start/resume a conversation from a" + + " IConversationManager when exists a diferent IConversationManager " + + " with open ISession registered on TransactionSynchronizationManager."); + } + } + else + { + throw new InvalidOperationException("Can not close session beacause holder, on TransactionSynchronizationManager, is not a LazySessionPerConversationHolder."); + } + } + else + { + if (isLogDebugEnabled) log.Warn("DoClose: TransactionSynchronizationManager.UnbindResource(sessionFactory) has no SessionHolder. Should I throw error?"); + } + } + + private void DoOpenSession(IConversationState conversation) + { + lock (this) + { + ISession session = null; + if (conversation.RootSessionPerConversation == null) + { + //new session + session = ( + (EntityInterceptor != null) + ? conversation.SessionFactory.OpenSession(EntityInterceptor) + : conversation.SessionFactory.OpenSession() + ); + conversation.RootSessionPerConversation = session; + } + else + { + //reconnect existing one. + if (conversation.DbProvider != null) + { + if (log.IsDebugEnabled) log.Debug(String.Format("DoOpenSession: Conversation has a DbProvider: Id='{0}'", conversation.Id)); + if (!conversation.RootSessionPerConversation.IsConnected) + { + if (log.IsDebugEnabled) log.Debug(String.Format("DoOpenSession: Conversation is not Connected: Id='{0}'", conversation.Id)); + + IDbConnection connection = conversation.DbProvider.CreateConnection(); + connection.Open(); + + conversation.RootSessionPerConversation.Reconnect(connection); + } + else + { + if (log.IsDebugEnabled) log.Debug(String.Format("DoOpenSession: Conversation is already Connected: Id='{0}'", conversation.Id)); + } + } + else + { + if (log.IsDebugEnabled) log.Debug(String.Format("DoOpenSession: Conversation has NO DbProvider: Id='{0}'", conversation.Id)); + conversation.RootSessionPerConversation.Reconnect(); + } + session = conversation.RootSessionPerConversation; + } + session.FlushMode = DefaultFlushMode; + } + } + + #endregion + + #region LazySessionPerConversationHolder utility class + + + /// + /// This sessionHolder creates a session for the active conversation only if it is + /// needed (). + /// + /// + /// Although a NHibernateSession defers creation of db-connections until they are really + /// needed, instantiation a session is still more expensive than using LazySessionHolder. + /// + private class LazySessionPerConversationHolder : SessionHolder + { + private readonly ILog log = LogManager.GetLogger(typeof(LazySessionPerConversationHolder)); + private SessionPerConversationScope owner; + public SessionPerConversationScope Owner + { + get { return owner; } + } + IConversationState activeConversation; + ICollection allManagedConversation; + + /// + /// Initialize a new instance. + /// + public LazySessionPerConversationHolder(SessionPerConversationScope owner, IConversationState activeConversation, ICollection allManagedConversation) + { + if (log.IsDebugEnabled) log.Debug("Created LazyReconnectableSessionHolder"); + this.owner = owner; + this.activeConversation = activeConversation; + this.allManagedConversation = allManagedConversation; + } + + /// + /// Create a new session on demand + /// + protected override void EnsureInitialized() + { + if (this.activeConversation.RootSessionPerConversation == null || !this.activeConversation.RootSessionPerConversation.IsConnected) + { + if (log.IsDebugEnabled) log.Debug("EnsureInitialized: 'session-per-conversation' instance requested - opening new session"); + owner.DoOpenSession(this.activeConversation); + AddSession(this.activeConversation.RootSessionPerConversation); + } + } + + public void CloseAll() + { + foreach (IConversationState conversation in this.allManagedConversation) + { + this.CloseConversation(conversation); + } + owner = null; + this.activeConversation = null; + this.allManagedConversation = null; + + if (log.IsDebugEnabled) log.Debug("CloseAll LazySessionPerConversationHolder"); + } + + private void CloseConversation(IConversationState conversation) + { + if (log.IsDebugEnabled) log.Debug(String.Format("CloseConversation: Id='{0}'", conversation.Id)); + if (conversation.RootSessionPerConversation != null) + { + ISession tmpSession = conversation.RootSessionPerConversation; + if (conversation.Ended) + { + SessionFactoryUtils.CloseSession(tmpSession); + conversation.RootSessionPerConversation = null; + } + else + { + if (tmpSession.IsConnected) + tmpSession.Disconnect(); + } + RemoveSession(tmpSession); + } + if (log.IsDebugEnabled) log.Debug("Closed LazySessionPerConversationHolder"); + } + } + + #endregion + } } \ No newline at end of file diff --git a/src/Spring/Spring.ConversationWA.NH32/Data/NHibernate/Support/SessionPerConversationSettings.cs b/src/Spring/Spring.Web.Conversation.NHibernate32/Data/NHibernate/Support/SessionPerConversationSettings.cs similarity index 97% rename from src/Spring/Spring.ConversationWA.NH32/Data/NHibernate/Support/SessionPerConversationSettings.cs rename to src/Spring/Spring.Web.Conversation.NHibernate32/Data/NHibernate/Support/SessionPerConversationSettings.cs index 0170aee1..1f01e632 100644 --- a/src/Spring/Spring.ConversationWA.NH32/Data/NHibernate/Support/SessionPerConversationSettings.cs +++ b/src/Spring/Spring.Web.Conversation.NHibernate32/Data/NHibernate/Support/SessionPerConversationSettings.cs @@ -1,118 +1,118 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Collections.Generic; -using System.Text; -using NHibernate; -using Spring.Util; - -namespace Spring.Data.NHibernate.Support -{ - /// - /// Setting for - /// - /// Hailton de Castro - [Serializable] - public class SessionPerConversationScopeSettings - { - /// - /// Default value for property. - /// - public static readonly FlushMode FLUSHMODE_DEFAULT = FlushMode.Never; - - private IInterceptor entityInterceptor; - private FlushMode defaultFlushMode; - - /// - /// Initialize a new instance of with default values. - /// - /// - /// Calling this constructor from your derived class leaves - /// uninitialized. See for more. - /// - public SessionPerConversationScopeSettings() - { - this.entityInterceptor = null; - this.defaultFlushMode = FLUSHMODE_DEFAULT; - } - - /// - /// Initialize a new instance of with the given values and references. - /// - /// - /// Specify the to be set on each session provided by the instance. - /// - /// - /// Specify the flushmode to be applied on each session provided by the instance. - /// - /// - /// Calling this constructor marks all properties initialized. - /// - public SessionPerConversationScopeSettings(IInterceptor entityInterceptor, FlushMode defaultFlushMode) - { - this.entityInterceptor = entityInterceptor; - this.defaultFlushMode = defaultFlushMode; - } - - #region Properties - - /// - /// Gets the configured instance to be used. - /// - /// - /// - public virtual IInterceptor EntityInterceptor - { - get - { - return entityInterceptor; - } - set - { - entityInterceptor = value; - } - } - - /// - /// Gets or Sets the flushmode to be applied on each newly created session. - /// - /// - /// This property defaults to to ensure that modifying objects outside the boundaries - /// of a transaction will not be persisted. It is recommended to not change this value but wrap any modifying operation - /// within a transaction. - /// - public FlushMode DefaultFlushMode - { - get { return defaultFlushMode; } - set { defaultFlushMode = value; } - } - - #endregion - - /// - /// Override this method to resolve an instance according to your chosen strategy. - /// - protected virtual IInterceptor ResolveEntityInterceptor() - { - return null; - } - } -} +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; +using NHibernate; +using Spring.Util; + +namespace Spring.Data.NHibernate.Support +{ + /// + /// Setting for + /// + /// Hailton de Castro + [Serializable] + public class SessionPerConversationScopeSettings + { + /// + /// Default value for property. + /// + public static readonly FlushMode FLUSHMODE_DEFAULT = FlushMode.Never; + + private IInterceptor entityInterceptor; + private FlushMode defaultFlushMode; + + /// + /// Initialize a new instance of with default values. + /// + /// + /// Calling this constructor from your derived class leaves + /// uninitialized. See for more. + /// + public SessionPerConversationScopeSettings() + { + this.entityInterceptor = null; + this.defaultFlushMode = FLUSHMODE_DEFAULT; + } + + /// + /// Initialize a new instance of with the given values and references. + /// + /// + /// Specify the to be set on each session provided by the instance. + /// + /// + /// Specify the flushmode to be applied on each session provided by the instance. + /// + /// + /// Calling this constructor marks all properties initialized. + /// + public SessionPerConversationScopeSettings(IInterceptor entityInterceptor, FlushMode defaultFlushMode) + { + this.entityInterceptor = entityInterceptor; + this.defaultFlushMode = defaultFlushMode; + } + + #region Properties + + /// + /// Gets the configured instance to be used. + /// + /// + /// + public virtual IInterceptor EntityInterceptor + { + get + { + return entityInterceptor; + } + set + { + entityInterceptor = value; + } + } + + /// + /// Gets or Sets the flushmode to be applied on each newly created session. + /// + /// + /// This property defaults to to ensure that modifying objects outside the boundaries + /// of a transaction will not be persisted. It is recommended to not change this value but wrap any modifying operation + /// within a transaction. + /// + public FlushMode DefaultFlushMode + { + get { return defaultFlushMode; } + set { defaultFlushMode = value; } + } + + #endregion + + /// + /// Override this method to resolve an instance according to your chosen strategy. + /// + protected virtual IInterceptor ResolveEntityInterceptor() + { + return null; + } + } +} diff --git a/src/Spring/Spring.ConversationWA.NH32/Spring.ConversationWA.NH32.2008.csproj b/src/Spring/Spring.Web.Conversation.NHibernate32/Spring.ConversationWA.NH32.2008.csproj similarity index 97% rename from src/Spring/Spring.ConversationWA.NH32/Spring.ConversationWA.NH32.2008.csproj rename to src/Spring/Spring.Web.Conversation.NHibernate32/Spring.ConversationWA.NH32.2008.csproj index f922c60f..8113f9dc 100644 --- a/src/Spring/Spring.ConversationWA.NH32/Spring.ConversationWA.NH32.2008.csproj +++ b/src/Spring/Spring.Web.Conversation.NHibernate32/Spring.ConversationWA.NH32.2008.csproj @@ -1,102 +1,102 @@ - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87} - Library - Properties - Spring - Spring.ConversationWA.NH32 - - - 2.0 - v2.0 - - - - - - - true - full - false - ..\..\..\build\VS.Net.2008\Spring.ConversationWA.NH32\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Spring.ConversationWA.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\Net\2.0\Common.Logging.dll - - - False - ..\..\..\lib\NHibernate32\net\3.5\Iesi.Collections.dll - - - False - ..\..\..\lib\NHibernate32\net\3.5\NHibernate.dll - - - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - - - nant.xsd - - - - - - {710961A3-0DF4-49E4-A26E-F5B9C044AC84} - Spring.Core.2008 - - - {1C8E0481-A70D-445E-AB4D-4A963CF7DC83} - Spring.Data.NHibernate32.2008 - - - {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} - Spring.Data.2008 - - - - - - - + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87} + Library + Properties + Spring + Spring.ConversationWA.NH32 + + + 2.0 + v2.0 + + + + + + + true + full + false + ..\..\..\build\VS.Net.2008\Spring.ConversationWA.NH32\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\Spring.ConversationWA.xml + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\Net\2.0\Common.Logging.dll + + + False + ..\..\..\lib\NHibernate32\net\3.5\Iesi.Collections.dll + + + False + ..\..\..\lib\NHibernate32\net\3.5\NHibernate.dll + + + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + + + nant.xsd + + + + + + {710961A3-0DF4-49E4-A26E-F5B9C044AC84} + Spring.Core.2008 + + + {1C8E0481-A70D-445E-AB4D-4A963CF7DC83} + Spring.Data.NHibernate32.2008 + + + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} + Spring.Data.2008 + + + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.ConversationWA.NH32/Spring.ConversationWA.NH32.2010.csproj b/src/Spring/Spring.Web.Conversation.NHibernate32/Spring.ConversationWA.NH32.2010.csproj similarity index 97% rename from src/Spring/Spring.ConversationWA.NH32/Spring.ConversationWA.NH32.2010.csproj rename to src/Spring/Spring.Web.Conversation.NHibernate32/Spring.ConversationWA.NH32.2010.csproj index de80e395..f900d5c7 100644 --- a/src/Spring/Spring.ConversationWA.NH32/Spring.ConversationWA.NH32.2010.csproj +++ b/src/Spring/Spring.Web.Conversation.NHibernate32/Spring.ConversationWA.NH32.2010.csproj @@ -1,101 +1,101 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87} - Library - Properties - Spring - Spring.ConversationWA.NH32 - - - 3.5 - v4.0 - - - - - true - full - false - ..\..\..\build\VS.Net.2010\Spring.ConversationWA.NH32\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Spring.ConversationWA.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\Net\2.0\Common.Logging.dll - - - False - ..\..\..\lib\NHibernate32\net\3.5\Iesi.Collections.dll - - - False - ..\..\..\lib\NHibernate32\net\3.5\NHibernate.dll - - - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - - - nant.xsd - - - - - - {710961A3-0DF4-49E4-A26E-F5B9C044AC84} - Spring.Core.2010 - - - {1C8E0481-A70D-445E-AB4D-4A963CF7DC83} - Spring.Data.NHibernate32.2010 - - - {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} - Spring.Data.2010 - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87} + Library + Properties + Spring + Spring.ConversationWA.NH32 + + + 3.5 + v4.0 + + + + + true + full + false + ..\..\..\build\VS.Net.2010\Spring.ConversationWA.NH32\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\Spring.ConversationWA.xml + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\Net\2.0\Common.Logging.dll + + + False + ..\..\..\lib\NHibernate32\net\3.5\Iesi.Collections.dll + + + False + ..\..\..\lib\NHibernate32\net\3.5\NHibernate.dll + + + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + + + nant.xsd + + + + + + {710961A3-0DF4-49E4-A26E-F5B9C044AC84} + Spring.Core.2010 + + + {1C8E0481-A70D-445E-AB4D-4A963CF7DC83} + Spring.Data.NHibernate32.2010 + + + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} + Spring.Data.2010 + + + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.ConversationWA.NH32/Spring.ConversationWA.NH32.build b/src/Spring/Spring.Web.Conversation.NHibernate32/Spring.ConversationWA.NH32.build similarity index 97% rename from src/Spring/Spring.ConversationWA.NH32/Spring.ConversationWA.NH32.build rename to src/Spring/Spring.Web.Conversation.NHibernate32/Spring.ConversationWA.NH32.build index b192fd2f..2705e10d 100644 --- a/src/Spring/Spring.ConversationWA.NH32/Spring.ConversationWA.NH32.build +++ b/src/Spring/Spring.Web.Conversation.NHibernate32/Spring.ConversationWA.NH32.build @@ -1,45 +1,45 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Spring/Spring.ConversationWA.NH32/app.config b/src/Spring/Spring.Web.Conversation.NHibernate32/app.config similarity index 95% rename from src/Spring/Spring.ConversationWA.NH32/app.config rename to src/Spring/Spring.Web.Conversation.NHibernate32/app.config index 73859b00..0df7832f 100644 --- a/src/Spring/Spring.ConversationWA.NH32/app.config +++ b/src/Spring/Spring.Web.Conversation.NHibernate32/app.config @@ -1,3 +1,3 @@ - - - + + + diff --git a/src/Spring/Spring.ConversationWA.NH33/AssemblyInfo.cs b/src/Spring/Spring.Web.Conversation.NHibernate33/AssemblyInfo.cs similarity index 98% rename from src/Spring/Spring.ConversationWA.NH33/AssemblyInfo.cs rename to src/Spring/Spring.Web.Conversation.NHibernate33/AssemblyInfo.cs index d2710eea..6931d3d5 100644 --- a/src/Spring/Spring.ConversationWA.NH33/AssemblyInfo.cs +++ b/src/Spring/Spring.Web.Conversation.NHibernate33/AssemblyInfo.cs @@ -1,5 +1,5 @@ -using System; -using System.Reflection; - -[assembly: AssemblyTitle("Spring.ConversationWA.NH33. NHibernate 3.3 support.")] +using System; +using System.Reflection; + +[assembly: AssemblyTitle("Spring.ConversationWA.NH33. NHibernate 3.3 support.")] [assembly: AssemblyDescription("Interfaces and classes that provide 'Conversation Workaround' support in Spring.Net")] \ No newline at end of file diff --git a/src/Spring/Spring.ConversationWA.NH33/ConversationWA/HttpModule/dontdelete.txt b/src/Spring/Spring.Web.Conversation.NHibernate33/ConversationWA/HttpModule/dontdelete.txt similarity index 100% rename from src/Spring/Spring.ConversationWA.NH33/ConversationWA/HttpModule/dontdelete.txt rename to src/Spring/Spring.Web.Conversation.NHibernate33/ConversationWA/HttpModule/dontdelete.txt diff --git a/src/Spring/Spring.ConversationWA.NH33/ConversationWA/dontdelete.txt b/src/Spring/Spring.Web.Conversation.NHibernate33/ConversationWA/dontdelete.txt similarity index 100% rename from src/Spring/Spring.ConversationWA.NH33/ConversationWA/dontdelete.txt rename to src/Spring/Spring.Web.Conversation.NHibernate33/ConversationWA/dontdelete.txt diff --git a/src/Spring/Spring.ConversationWA.NH33/Data/NHibernate/Support/dontdelete.txt b/src/Spring/Spring.Web.Conversation.NHibernate33/Data/NHibernate/Support/dontdelete.txt similarity index 100% rename from src/Spring/Spring.ConversationWA.NH33/Data/NHibernate/Support/dontdelete.txt rename to src/Spring/Spring.Web.Conversation.NHibernate33/Data/NHibernate/Support/dontdelete.txt diff --git a/src/Spring/Spring.ConversationWA.NH33/Spring.ConversationWA.NH33.2008.csproj b/src/Spring/Spring.Web.Conversation.NHibernate33/Spring.ConversationWA.NH33.2008.csproj similarity index 97% rename from src/Spring/Spring.ConversationWA.NH33/Spring.ConversationWA.NH33.2008.csproj rename to src/Spring/Spring.Web.Conversation.NHibernate33/Spring.ConversationWA.NH33.2008.csproj index 42d460d1..995c9f88 100644 --- a/src/Spring/Spring.ConversationWA.NH33/Spring.ConversationWA.NH33.2008.csproj +++ b/src/Spring/Spring.Web.Conversation.NHibernate33/Spring.ConversationWA.NH33.2008.csproj @@ -1,112 +1,112 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {CF375928-B6D5-485C-B04D-2BC41D9DBF1E} - Library - Properties - Spring - Spring.ConversationWA.NH33 - v3.0 - 512 - - - - - true - full - false - ..\..\..\build\VS.Net.2008\Spring.ConversationWA.NH33\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Spring.ConversationWA.NH33.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\Net\2.0\Common.Logging.dll - - - False - ..\..\..\lib\NHibernate33\net\3.5\Iesi.Collections.dll - - - False - ..\..\..\lib\NHibernate33\net\3.5\NHibernate.dll - - - - - - - - - CommonAssemblyInfo.cs - - - Conversation\HttpModule\ConversationModule.cs - - - Conversation\IConversationManager.cs - - - Conversation\IConversationState.cs - - - Conversation\Imple\InnerConversationList.cs - - - Conversation\Imple\WebConversationManager.cs - - - Conversation\Imple\WebConversationSpringState.cs - - - Data\NHibernate\Support\SessionPerConversationScope.cs - - - Data\NHibernate\Support\SessionPerConversationSettings.cs - - - - - - - - - {710961A3-0DF4-49E4-A26E-F5B9C044AC84} - Spring.Core.2008 - - - {67EA5988-C54E-4348-BFFB-E4A61F26143C} - Spring.Data.NHibernate33.2008 - - - {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} - Spring.Data.2008 - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {CF375928-B6D5-485C-B04D-2BC41D9DBF1E} + Library + Properties + Spring + Spring.ConversationWA.NH33 + v3.0 + 512 + + + + + true + full + false + ..\..\..\build\VS.Net.2008\Spring.ConversationWA.NH33\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\Spring.ConversationWA.NH33.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\Net\2.0\Common.Logging.dll + + + False + ..\..\..\lib\NHibernate33\net\3.5\Iesi.Collections.dll + + + False + ..\..\..\lib\NHibernate33\net\3.5\NHibernate.dll + + + + + + + + + CommonAssemblyInfo.cs + + + Conversation\HttpModule\ConversationModule.cs + + + Conversation\IConversationManager.cs + + + Conversation\IConversationState.cs + + + Conversation\Imple\InnerConversationList.cs + + + Conversation\Imple\WebConversationManager.cs + + + Conversation\Imple\WebConversationSpringState.cs + + + Data\NHibernate\Support\SessionPerConversationScope.cs + + + Data\NHibernate\Support\SessionPerConversationSettings.cs + + + + + + + + + {710961A3-0DF4-49E4-A26E-F5B9C044AC84} + Spring.Core.2008 + + + {67EA5988-C54E-4348-BFFB-E4A61F26143C} + Spring.Data.NHibernate33.2008 + + + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} + Spring.Data.2008 + + + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.ConversationWA.NH33/Spring.ConversationWA.NH33.2010.csproj b/src/Spring/Spring.Web.Conversation.NHibernate33/Spring.ConversationWA.NH33.2010.csproj similarity index 97% rename from src/Spring/Spring.ConversationWA.NH33/Spring.ConversationWA.NH33.2010.csproj rename to src/Spring/Spring.Web.Conversation.NHibernate33/Spring.ConversationWA.NH33.2010.csproj index 35cd6d3d..5be4c7ea 100644 --- a/src/Spring/Spring.ConversationWA.NH33/Spring.ConversationWA.NH33.2010.csproj +++ b/src/Spring/Spring.Web.Conversation.NHibernate33/Spring.ConversationWA.NH33.2010.csproj @@ -1,114 +1,114 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {CF375928-B6D5-485C-B04D-2BC41D9DBF1E} - Library - Properties - Spring - Spring.ConversationWA.NH33 - v4.0 - 512 - - - 3.5 - - - - true - full - false - ..\..\..\build\VS.Net.2010\Spring.ConversationWA.NH33\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Spring.ConversationWA.NH33.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\Net\2.0\Common.Logging.dll - - - False - ..\..\..\lib\NHibernate33\net\3.5\Iesi.Collections.dll - - - False - ..\..\..\lib\NHibernate33\net\3.5\NHibernate.dll - - - - - - - - - CommonAssemblyInfo.cs - - - Conversation\HttpModule\ConversationModule.cs - - - Conversation\IConversationManager.cs - - - Conversation\IConversationState.cs - - - Conversation\Impl\InnerConversationList.cs - - - Conversation\Impl\WebConversationManager.cs - - - Conversation\Impl\WebConversationSpringState.cs - - - Data\NHibernate\Support\SessionPerConversationScope.cs - - - Data\NHibernate\Support\SessionPerConversationSettings.cs - - - - - - - - - {710961A3-0DF4-49E4-A26E-F5B9C044AC84} - Spring.Core.2010 - - - {67EA5988-C54E-4348-BFFB-E4A61F26143C} - Spring.Data.NHibernate33.2010 - - - {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} - Spring.Data.2010 - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {CF375928-B6D5-485C-B04D-2BC41D9DBF1E} + Library + Properties + Spring + Spring.ConversationWA.NH33 + v4.0 + 512 + + + 3.5 + + + + true + full + false + ..\..\..\build\VS.Net.2010\Spring.ConversationWA.NH33\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\Spring.ConversationWA.NH33.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\Net\2.0\Common.Logging.dll + + + False + ..\..\..\lib\NHibernate33\net\3.5\Iesi.Collections.dll + + + False + ..\..\..\lib\NHibernate33\net\3.5\NHibernate.dll + + + + + + + + + CommonAssemblyInfo.cs + + + Conversation\HttpModule\ConversationModule.cs + + + Conversation\IConversationManager.cs + + + Conversation\IConversationState.cs + + + Conversation\Impl\InnerConversationList.cs + + + Conversation\Impl\WebConversationManager.cs + + + Conversation\Impl\WebConversationSpringState.cs + + + Data\NHibernate\Support\SessionPerConversationScope.cs + + + Data\NHibernate\Support\SessionPerConversationSettings.cs + + + + + + + + + {710961A3-0DF4-49E4-A26E-F5B9C044AC84} + Spring.Core.2010 + + + {67EA5988-C54E-4348-BFFB-E4A61F26143C} + Spring.Data.NHibernate33.2010 + + + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} + Spring.Data.2010 + + + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.ConversationWA.NH33/Spring.ConversationWA.NH33.build b/src/Spring/Spring.Web.Conversation.NHibernate33/Spring.ConversationWA.NH33.build similarity index 97% rename from src/Spring/Spring.ConversationWA.NH33/Spring.ConversationWA.NH33.build rename to src/Spring/Spring.Web.Conversation.NHibernate33/Spring.ConversationWA.NH33.build index bb78c171..a4773863 100644 --- a/src/Spring/Spring.ConversationWA.NH33/Spring.ConversationWA.NH33.build +++ b/src/Spring/Spring.Web.Conversation.NHibernate33/Spring.ConversationWA.NH33.build @@ -1,47 +1,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Spring/Spring.ConversationWA.NH33/app.config b/src/Spring/Spring.Web.Conversation.NHibernate33/app.config similarity index 95% rename from src/Spring/Spring.ConversationWA.NH33/app.config rename to src/Spring/Spring.Web.Conversation.NHibernate33/app.config index 73859b00..0df7832f 100644 --- a/src/Spring/Spring.ConversationWA.NH33/app.config +++ b/src/Spring/Spring.Web.Conversation.NHibernate33/app.config @@ -1,3 +1,3 @@ - - - + + + diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/AssemblyInfo.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/AssemblyInfo.cs similarity index 97% rename from test/Spring/Spring.ConversationWA.NH32.Tests/AssemblyInfo.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/AssemblyInfo.cs index 9d95a597..9ac8b150 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/AssemblyInfo.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/AssemblyInfo.cs @@ -1,5 +1,5 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyTitle("Spring.ConversationWA.NH32 Integration Tests")] -[assembly: AssemblyDescription("Integration tests for Spring.ConversationWA.NH32.Tests assembly")] +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyTitle("Spring.ConversationWA.NH32 Integration Tests")] +[assembly: AssemblyDescription("Integration tests for Spring.ConversationWA.NH32.Tests assembly")] diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Bsn/ConversationEvidenceBsnImpl.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Bsn/ConversationEvidenceBsnImpl.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Bsn/ConversationEvidenceBsnImpl.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Bsn/ConversationEvidenceBsnImpl.cs index c5ce9eac..778a33f6 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Bsn/ConversationEvidenceBsnImpl.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Bsn/ConversationEvidenceBsnImpl.cs @@ -1,55 +1,55 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Data; -using System.Configuration; - -namespace Spring.Bsn -{ - /// - /// - /// - public class ConversationEvidenceBsnImpl: IConversationEvidenceBsn - { - private String uniqueId = ""; - - /// - /// Create instance with unique id. - /// - public ConversationEvidenceBsnImpl() - { - uniqueId = Guid.NewGuid().ToString(); - } - - #region IConversationEvidenceBsn Members - - /// - /// - /// - /// - public String UniqueId() - { - return this.uniqueId; - } - - #endregion - } -} +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Data; +using System.Configuration; + +namespace Spring.Bsn +{ + /// + /// + /// + public class ConversationEvidenceBsnImpl: IConversationEvidenceBsn + { + private String uniqueId = ""; + + /// + /// Create instance with unique id. + /// + public ConversationEvidenceBsnImpl() + { + uniqueId = Guid.NewGuid().ToString(); + } + + #region IConversationEvidenceBsn Members + + /// + /// + /// + /// + public String UniqueId() + { + return this.uniqueId; + } + + #endregion + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Bsn/IConversationEvidenceBsn.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Bsn/IConversationEvidenceBsn.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Bsn/IConversationEvidenceBsn.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Bsn/IConversationEvidenceBsn.cs index 003533dd..c08782ed 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Bsn/IConversationEvidenceBsn.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Bsn/IConversationEvidenceBsn.cs @@ -1,39 +1,39 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Collections.Generic; -using System.Text; - -namespace Spring.Bsn -{ - /// - /// Simulates a business infrastructure in order to demonstrate the end of - /// the conversation. - /// - public interface IConversationEvidenceBsn - { - /// - /// Return a unique id per instance. - /// - /// - String UniqueId(); - } -} +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Spring.Bsn +{ + /// + /// Simulates a business infrastructure in order to demonstrate the end of + /// the conversation. + /// + public interface IConversationEvidenceBsn + { + /// + /// Return a unique id per instance. + /// + /// + String UniqueId(); + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Bsn/INoDeferedErrorBsn.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Bsn/INoDeferedErrorBsn.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Bsn/INoDeferedErrorBsn.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Bsn/INoDeferedErrorBsn.cs index 55dc6c58..15ccd062 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Bsn/INoDeferedErrorBsn.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Bsn/INoDeferedErrorBsn.cs @@ -1,37 +1,37 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Collections.Generic; -using System.Text; - -namespace Spring.Bsn -{ - /// - /// TODO: - /// - public interface IConnectionReleaseModeIssueBsn - { - /// - /// TODO - /// - void Test(); - } -} +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Spring.Bsn +{ + /// + /// TODO: + /// + public interface IConnectionReleaseModeIssueBsn + { + /// + /// TODO + /// + void Test(); + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Bsn/NoDeferedErrorBsnImpl.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Bsn/NoDeferedErrorBsnImpl.cs similarity index 97% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Bsn/NoDeferedErrorBsnImpl.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Bsn/NoDeferedErrorBsnImpl.cs index c440a266..270c0a1c 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Bsn/NoDeferedErrorBsnImpl.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Bsn/NoDeferedErrorBsnImpl.cs @@ -1,83 +1,83 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Collections.Generic; -using System.Text; -using NHibernate; -using Spring.Entities; -using NUnit.Framework; -using Spring.Spring.Data.Common; - -namespace Spring.Bsn -{ - /// - /// Outside the "transaction boundaries", each statement - /// execution (lazy loads) was being made a call to - /// "IDbProvider.CreateConnection()". This would - /// cause a large over-reading because most of the "lazy loads" tend to - /// occur outside the "transaction boundaries". - /// The solution to this is to use "connection.release_mode" with "on_close" - /// in "HibernateProperties." - /// This test was created to show how the connection openings - /// occur in the following scenarios: - /// *Test with conversation and "connection.release_mode" - /// "auto"(ConnectionReleaseMode.AfterTransaction). - /// *Test with NO conversation and "connection.release_mode" - /// "auto"(ConnectionReleaseMode.AfterTransaction) - /// on block within the scope of "transaction boundary". - /// *Test with NO conversation and "connection.release_mode" - /// "auto"(ConnectionReleaseMode.AfterTransaction). - /// *Test with conversation and "connection.release_mode" - /// "on_close"(ConnectionReleaseMode.OnClose). - /// - public class ConnectionReleaseModeIssueBsnImpl : IConnectionReleaseModeIssueBsn - { - private ISessionFactory sessionFactory; - /// - /// SessionFactory. - /// - public ISessionFactory SessionFactory - { - get { return sessionFactory; } - set { sessionFactory = value; } - } - - #region IConnectionReleaseModeIssueBsn Members - - /// - /// Test. - /// - [Transaction.Interceptor.Transaction(ReadOnly=true)] - public void Test() - { - ISession sessionNoConv = this.SessionFactory.GetCurrentSession(); - SPCMasterEnt masterEnt2 = sessionNoConv.Get(2); - Assert.AreEqual(1, masterEnt2.SPCDetailEntList.Count, "masterEnt2.SPCDetailEntList.Count"); - - SPCMasterEnt masterEnt3 = sessionNoConv.Get(3); - Assert.AreEqual(1, masterEnt3.SPCDetailEntList.Count, "masterEnt3.SPCDetailEntList.Count"); - - Assert.AreEqual(1, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); - } - - #endregion - } -} +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; +using NHibernate; +using Spring.Entities; +using NUnit.Framework; +using Spring.Spring.Data.Common; + +namespace Spring.Bsn +{ + /// + /// Outside the "transaction boundaries", each statement + /// execution (lazy loads) was being made a call to + /// "IDbProvider.CreateConnection()". This would + /// cause a large over-reading because most of the "lazy loads" tend to + /// occur outside the "transaction boundaries". + /// The solution to this is to use "connection.release_mode" with "on_close" + /// in "HibernateProperties." + /// This test was created to show how the connection openings + /// occur in the following scenarios: + /// *Test with conversation and "connection.release_mode" + /// "auto"(ConnectionReleaseMode.AfterTransaction). + /// *Test with NO conversation and "connection.release_mode" + /// "auto"(ConnectionReleaseMode.AfterTransaction) + /// on block within the scope of "transaction boundary". + /// *Test with NO conversation and "connection.release_mode" + /// "auto"(ConnectionReleaseMode.AfterTransaction). + /// *Test with conversation and "connection.release_mode" + /// "on_close"(ConnectionReleaseMode.OnClose). + /// + public class ConnectionReleaseModeIssueBsnImpl : IConnectionReleaseModeIssueBsn + { + private ISessionFactory sessionFactory; + /// + /// SessionFactory. + /// + public ISessionFactory SessionFactory + { + get { return sessionFactory; } + set { sessionFactory = value; } + } + + #region IConnectionReleaseModeIssueBsn Members + + /// + /// Test. + /// + [Transaction.Interceptor.Transaction(ReadOnly=true)] + public void Test() + { + ISession sessionNoConv = this.SessionFactory.GetCurrentSession(); + SPCMasterEnt masterEnt2 = sessionNoConv.Get(2); + Assert.AreEqual(1, masterEnt2.SPCDetailEntList.Count, "masterEnt2.SPCDetailEntList.Count"); + + SPCMasterEnt masterEnt3 = sessionNoConv.Get(3); + Assert.AreEqual(1, masterEnt3.SPCDetailEntList.Count, "masterEnt3.SPCDetailEntList.Count"); + + Assert.AreEqual(1, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); + } + + #endregion + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/ConversationWA/PatialEndConvBeginBasePage.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/ConversationWA/PatialEndConvBeginBasePage.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/ConversationWA/PatialEndConvBeginBasePage.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/ConversationWA/PatialEndConvBeginBasePage.cs index 3e99e9b0..e27db7e4 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/ConversationWA/PatialEndConvBeginBasePage.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/ConversationWA/PatialEndConvBeginBasePage.cs @@ -1,57 +1,57 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Collections.Generic; -using System.Text; -using Spring.Web.UI; -using Spring.ConversationWA; - -namespace Spring.ConversationWA -{ - /// - /// Base class for test pages for test - /// . - /// - public class PatialEndConvBeginBasePage: Page - { - private IConversationState conversation; - /// - /// - /// - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - - /// - /// Common Begin. - /// - /// - /// - protected virtual void Page_Load(object sender, EventArgs e) - { - this.Conversation.StartResumeConversation(); - - Session["ConversationStr"] = this.Conversation.ToString(); - } - } -} +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; +using Spring.Web.UI; +using Spring.ConversationWA; + +namespace Spring.ConversationWA +{ + /// + /// Base class for test pages for test + /// . + /// + public class PatialEndConvBeginBasePage: Page + { + private IConversationState conversation; + /// + /// + /// + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + + /// + /// Common Begin. + /// + /// + /// + protected virtual void Page_Load(object sender, EventArgs e) + { + this.Conversation.StartResumeConversation(); + + Session["ConversationStr"] = this.Conversation.ToString(); + } + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/ConversationWA/PatialEndConvEndBasePage.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/ConversationWA/PatialEndConvEndBasePage.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/ConversationWA/PatialEndConvEndBasePage.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/ConversationWA/PatialEndConvEndBasePage.cs index 439a9378..ec901bf2 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/ConversationWA/PatialEndConvEndBasePage.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/ConversationWA/PatialEndConvEndBasePage.cs @@ -1,55 +1,55 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Collections.Generic; -using System.Text; -using Spring.Web.UI; -using Spring.ConversationWA; - -namespace Spring.ConversationWA -{ - /// - /// Base class for test pages for test - /// . - /// - public abstract class PatialEndConvEndBasePage: Page - { - private IConversationState conversation; - /// - /// - /// - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - - /// - /// Common End. - /// - /// - /// - public virtual void Page_Load(object sender, EventArgs e) - { - this.Conversation.EndConversation(); - } - } -} +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; +using Spring.Web.UI; +using Spring.ConversationWA; + +namespace Spring.ConversationWA +{ + /// + /// Base class for test pages for test + /// . + /// + public abstract class PatialEndConvEndBasePage: Page + { + private IConversationState conversation; + /// + /// + /// + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + + /// + /// Common End. + /// + /// + /// + public virtual void Page_Load(object sender, EventArgs e) + { + this.Conversation.EndConversation(); + } + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/ConversationWA/SerializeConversationTestModule.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/ConversationWA/SerializeConversationTestModule.cs similarity index 97% rename from test/Spring/Spring.ConversationWA.NH32.Tests/ConversationWA/SerializeConversationTestModule.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/ConversationWA/SerializeConversationTestModule.cs index e212c362..7d7bcc5c 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/ConversationWA/SerializeConversationTestModule.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/ConversationWA/SerializeConversationTestModule.cs @@ -1,264 +1,264 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Web; -using System.Runtime.Serialization.Formatters.Binary; -using System.IO; -using System.Runtime.Remoting.Messaging; -using System.Runtime.Serialization; -using System.Reflection; -using Spring.Entities; - -namespace Spring.ConversationWA -{ - /// - /// Module that forces the serialization and deserialization of the session content to simulate a clustered server for - /// . - /// - public class SerializeConversationTestModule: IHttpModule - { - #region Logging - - private static readonly Common.Logging.ILog LOG = Common.Logging.LogManager.GetLogger(typeof(SerializeConversationTestModule)); - - #endregion - - /// - /// Serialized Session Content. - /// - private static MemoryStream SerializedSessionContentStream = new MemoryStream(); - - #region IHttpModule Members - - /// - /// TODO: - /// - public void Dispose() - { - // - } - - /// - /// TODO: - /// - /// - public void Init(HttpApplication context) - { - context.PreRequestHandlerExecute += new EventHandler(context_PreRequestHandlerExecute); - context.PostRequestHandlerExecute += new EventHandler(context_PostRequestHandlerExecute); - } - - /// - /// Repopulates the session from the previously serialized content. - /// - /// - /// - void context_PreRequestHandlerExecute(object sender, EventArgs e) - { - if (HttpContext.Current.Session != null) - { - if (HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath == "~/SerializeConversationTest.aspx") - { - if (SerializedSessionContentStream.Length > 0) - { - BinaryFormatter bf = new BinaryFormatter(); - bf.Binder = new MyBinder(); - //SurrogateSelector surrogateSelector = new SurrogateSelector(); - //surrogateSelector.AddSurrogate( - // typeof(Object), - // new StreamingContext(StreamingContextStates.All), - // new MySerializationSurrogate()); - //bf.SurrogateSelector = surrogateSelector; - - SerializedSessionContentStream.Seek(0, SeekOrigin.Begin); - Dictionary sessionConttent = - (Dictionary)bf.Deserialize(SerializedSessionContentStream); - - HttpContext.Current.Session.Clear(); - foreach (String keyItem in sessionConttent.Keys) - { - HttpContext.Current.Session[keyItem] = sessionConttent[keyItem]; - } - } - } - } - } - - /// - /// Serializes and clears the session. - /// - /// - /// - void context_PostRequestHandlerExecute(object sender, EventArgs e) - { - if (HttpContext.Current.Session != null) - { - //NHibernate.ISession ss; - if (HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath == "~/SerializeConversationTest.aspx") - { - Dictionary sessionConttent = new Dictionary(); - foreach (String keyItem in HttpContext.Current.Session.Keys) - { - sessionConttent[keyItem] = HttpContext.Current.Session[keyItem]; - } - - BinaryFormatter bf = new BinaryFormatter(); - bf.Binder = new MyBinder(); - //SurrogateSelector surrogateSelector = new SurrogateSelector(); - //surrogateSelector.AddSurrogate( - // typeof(Object), - // new StreamingContext(StreamingContextStates.All), - // new MySerializationSurrogate()); - //bf.SurrogateSelector = surrogateSelector; - - SerializedSessionContentStream = new MemoryStream(); - bf.Serialize(SerializedSessionContentStream, sessionConttent); - - HttpContext.Current.Session.Clear(); - } - } - } - #endregion - } - - public class MyBinder : SerializationBinder - { - #region Logging - - private Common.Logging.ILog LOG - { - get - { - return Common.Logging.LogManager.GetLogger(typeof(SerializeConversationTestModule)); - } - } - - #endregion - - public override Type BindToType(string assemblyName, string typeName) - { - if (LOG.IsDebugEnabled) - LOG.Debug(String.Format("MyBinder.BindToType: {0}, {1}", typeName, assemblyName)); - return Type.GetType(typeName + ", " + assemblyName); - } - } - - ///// - ///// For debugging purpose. - ///// - //public class MySurrogateSelectorWrapper : ISurrogateSelector - //{ - - // ISurrogateSelector wrapped; - // public MySurrogateSelectorWrapper(ISurrogateSelector wrapped) - // { - // this.wrapped = wrapped; - // } - // #region ISurrogateSelector Members - - // public void ChainSelector(ISurrogateSelector selector) - // { - // this.wrapped.ChainSelector(selector); - // } - - // public ISurrogateSelector GetNextSelector() - // { - // ISurrogateSelector selector = this.wrapped.GetNextSelector(); - // if (!(selector is MySurrogateSelectorWrapper)) - // selector = new MySurrogateSelectorWrapper(selector); - // return selector; - // } - - // public ISerializationSurrogate GetSurrogate(Type type, StreamingContext context, out ISurrogateSelector selector) - // { - // ISerializationSurrogate surrogate = new MySerializationSurrogate(this.wrapped.GetSurrogate(type, context, out selector)); - // if (!(selector is MySurrogateSelectorWrapper)) - // selector = new MySurrogateSelectorWrapper(selector); - // return surrogate; - // } - - // #endregion - //} - - /// - /// For debugging purpose. - /// - public class MySerializationSurrogate : ISerializationSurrogate - { - #region Logging - - private static readonly Common.Logging.ILog LOG = Common.Logging.LogManager.GetLogger(typeof(SerializeConversationTestModule)); - - #endregion - public MySerializationSurrogate() - { - } - - #region ISerializationSurrogate Members - - public void GetObjectData(object obj, SerializationInfo info, StreamingContext context) - { - if (LOG.IsDebugEnabled) - LOG.Debug(String.Format("MySerializationSurrogateWrapper.GetObjectData({0},...", obj.GetType())); - - FieldInfo[] fields = obj.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.FlattenHierarchy); - if (obj is ISerializable) - { - ((ISerializable)obj).GetObjectData(info, context); - } - else - { - for (int i = 0; i < fields.Length; i++) - { - if ((fields[i].Attributes & FieldAttributes.NotSerialized) == 0) - { - info.AddValue(fields[i].Name, fields[i].GetValue(obj), fields[i].FieldType); - } - } - } - } - - public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) - { - if (LOG.IsDebugEnabled) - LOG.Debug(String.Format("MySerializationSurrogateWrapper.SetObjectData({0},...", obj.GetType())); - - FieldInfo[] fields = obj.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); - - for (int i = 0; i < fields.Length; i++) - { - if ((fields[i].Attributes & FieldAttributes.NotSerialized) == 0) - { - fields[i].SetValue(obj, info.GetValue(fields[i].Name, fields[i].FieldType)); - } - } - if (obj is IDeserializationCallback) - ((IDeserializationCallback)obj).OnDeserialization(obj); - - return obj; - } - - #endregion - } -} +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Web; +using System.Runtime.Serialization.Formatters.Binary; +using System.IO; +using System.Runtime.Remoting.Messaging; +using System.Runtime.Serialization; +using System.Reflection; +using Spring.Entities; + +namespace Spring.ConversationWA +{ + /// + /// Module that forces the serialization and deserialization of the session content to simulate a clustered server for + /// . + /// + public class SerializeConversationTestModule: IHttpModule + { + #region Logging + + private static readonly Common.Logging.ILog LOG = Common.Logging.LogManager.GetLogger(typeof(SerializeConversationTestModule)); + + #endregion + + /// + /// Serialized Session Content. + /// + private static MemoryStream SerializedSessionContentStream = new MemoryStream(); + + #region IHttpModule Members + + /// + /// TODO: + /// + public void Dispose() + { + // + } + + /// + /// TODO: + /// + /// + public void Init(HttpApplication context) + { + context.PreRequestHandlerExecute += new EventHandler(context_PreRequestHandlerExecute); + context.PostRequestHandlerExecute += new EventHandler(context_PostRequestHandlerExecute); + } + + /// + /// Repopulates the session from the previously serialized content. + /// + /// + /// + void context_PreRequestHandlerExecute(object sender, EventArgs e) + { + if (HttpContext.Current.Session != null) + { + if (HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath == "~/SerializeConversationTest.aspx") + { + if (SerializedSessionContentStream.Length > 0) + { + BinaryFormatter bf = new BinaryFormatter(); + bf.Binder = new MyBinder(); + //SurrogateSelector surrogateSelector = new SurrogateSelector(); + //surrogateSelector.AddSurrogate( + // typeof(Object), + // new StreamingContext(StreamingContextStates.All), + // new MySerializationSurrogate()); + //bf.SurrogateSelector = surrogateSelector; + + SerializedSessionContentStream.Seek(0, SeekOrigin.Begin); + Dictionary sessionConttent = + (Dictionary)bf.Deserialize(SerializedSessionContentStream); + + HttpContext.Current.Session.Clear(); + foreach (String keyItem in sessionConttent.Keys) + { + HttpContext.Current.Session[keyItem] = sessionConttent[keyItem]; + } + } + } + } + } + + /// + /// Serializes and clears the session. + /// + /// + /// + void context_PostRequestHandlerExecute(object sender, EventArgs e) + { + if (HttpContext.Current.Session != null) + { + //NHibernate.ISession ss; + if (HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath == "~/SerializeConversationTest.aspx") + { + Dictionary sessionConttent = new Dictionary(); + foreach (String keyItem in HttpContext.Current.Session.Keys) + { + sessionConttent[keyItem] = HttpContext.Current.Session[keyItem]; + } + + BinaryFormatter bf = new BinaryFormatter(); + bf.Binder = new MyBinder(); + //SurrogateSelector surrogateSelector = new SurrogateSelector(); + //surrogateSelector.AddSurrogate( + // typeof(Object), + // new StreamingContext(StreamingContextStates.All), + // new MySerializationSurrogate()); + //bf.SurrogateSelector = surrogateSelector; + + SerializedSessionContentStream = new MemoryStream(); + bf.Serialize(SerializedSessionContentStream, sessionConttent); + + HttpContext.Current.Session.Clear(); + } + } + } + #endregion + } + + public class MyBinder : SerializationBinder + { + #region Logging + + private Common.Logging.ILog LOG + { + get + { + return Common.Logging.LogManager.GetLogger(typeof(SerializeConversationTestModule)); + } + } + + #endregion + + public override Type BindToType(string assemblyName, string typeName) + { + if (LOG.IsDebugEnabled) + LOG.Debug(String.Format("MyBinder.BindToType: {0}, {1}", typeName, assemblyName)); + return Type.GetType(typeName + ", " + assemblyName); + } + } + + ///// + ///// For debugging purpose. + ///// + //public class MySurrogateSelectorWrapper : ISurrogateSelector + //{ + + // ISurrogateSelector wrapped; + // public MySurrogateSelectorWrapper(ISurrogateSelector wrapped) + // { + // this.wrapped = wrapped; + // } + // #region ISurrogateSelector Members + + // public void ChainSelector(ISurrogateSelector selector) + // { + // this.wrapped.ChainSelector(selector); + // } + + // public ISurrogateSelector GetNextSelector() + // { + // ISurrogateSelector selector = this.wrapped.GetNextSelector(); + // if (!(selector is MySurrogateSelectorWrapper)) + // selector = new MySurrogateSelectorWrapper(selector); + // return selector; + // } + + // public ISerializationSurrogate GetSurrogate(Type type, StreamingContext context, out ISurrogateSelector selector) + // { + // ISerializationSurrogate surrogate = new MySerializationSurrogate(this.wrapped.GetSurrogate(type, context, out selector)); + // if (!(selector is MySurrogateSelectorWrapper)) + // selector = new MySurrogateSelectorWrapper(selector); + // return surrogate; + // } + + // #endregion + //} + + /// + /// For debugging purpose. + /// + public class MySerializationSurrogate : ISerializationSurrogate + { + #region Logging + + private static readonly Common.Logging.ILog LOG = Common.Logging.LogManager.GetLogger(typeof(SerializeConversationTestModule)); + + #endregion + public MySerializationSurrogate() + { + } + + #region ISerializationSurrogate Members + + public void GetObjectData(object obj, SerializationInfo info, StreamingContext context) + { + if (LOG.IsDebugEnabled) + LOG.Debug(String.Format("MySerializationSurrogateWrapper.GetObjectData({0},...", obj.GetType())); + + FieldInfo[] fields = obj.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.FlattenHierarchy); + if (obj is ISerializable) + { + ((ISerializable)obj).GetObjectData(info, context); + } + else + { + for (int i = 0; i < fields.Length; i++) + { + if ((fields[i].Attributes & FieldAttributes.NotSerialized) == 0) + { + info.AddValue(fields[i].Name, fields[i].GetValue(obj), fields[i].FieldType); + } + } + } + } + + public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) + { + if (LOG.IsDebugEnabled) + LOG.Debug(String.Format("MySerializationSurrogateWrapper.SetObjectData({0},...", obj.GetType())); + + FieldInfo[] fields = obj.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); + + for (int i = 0; i < fields.Length; i++) + { + if ((fields[i].Attributes & FieldAttributes.NotSerialized) == 0) + { + fields[i].SetValue(obj, info.GetValue(fields[i].Name, fields[i].FieldType)); + } + } + if (obj is IDeserializationCallback) + ((IDeserializationCallback)obj).OnDeserialization(obj); + + return obj; + } + + #endregion + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/ConversationWA/SimpleTest.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/ConversationWA/SimpleTest.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/ConversationWA/SimpleTest.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/ConversationWA/SimpleTest.cs index 53fb65f7..e4fbee69 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/ConversationWA/SimpleTest.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/ConversationWA/SimpleTest.cs @@ -1,38 +1,38 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NUnit.Framework; - -namespace Spring.ConversationWA -{ - [TestFixture] - public class SimpleTest - { - [Test] - public void Test() - { - Assert.AreEqual(2, 1 + 1, "2 == 1 + 1"); - } - } -} +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using NUnit.Framework; + +namespace Spring.ConversationWA +{ + [TestFixture] + public class SimpleTest + { + [Test] + public void Test() + { + Assert.AreEqual(2, 1 + 1, "2 == 1 + 1"); + } + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/ConversationWA/WebConversationStateTest.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/ConversationWA/WebConversationStateTest.cs similarity index 100% rename from test/Spring/Spring.ConversationWA.NH32.Tests/ConversationWA/WebConversationStateTest.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/ConversationWA/WebConversationStateTest.cs diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/CircularDependenceTest.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/CircularDependenceTest.aspx similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/CircularDependenceTest.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/CircularDependenceTest.aspx index 47f665a1..462b28e6 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/CircularDependenceTest.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/CircularDependenceTest.aspx @@ -1,3 +1,3 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CircularDependenceTest.aspx.cs" Inherits="CircularDependenceTest" %><% -Response.Write("OK"); +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CircularDependenceTest.aspx.cs" Inherits="CircularDependenceTest" %><% +Response.Write("OK"); %> \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/CircularDependenceTest.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/CircularDependenceTest.aspx.cs similarity index 97% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/CircularDependenceTest.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/CircularDependenceTest.aspx.cs index f137571c..432cbb1d 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/CircularDependenceTest.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/CircularDependenceTest.aspx.cs @@ -1,56 +1,56 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; -using NUnit.Framework; -using Spring.Context.Support; -using System.Text; -using Common.Logging; -using Spring.Context; - -public partial class CircularDependenceTest : System.Web.UI.Page, IApplicationContextAware -{ - private static readonly ILog LOG = LogManager.GetLogger(typeof(CircularDependenceTest)); - - protected void Page_Load(object sender, EventArgs e) - { - IConversationState convCircularDependenceTest_A = (IConversationState)this.applicationContext.GetObject("convCircularDependenceTest_A"); - IConversationState convCircularDependenceTest_A_A_A = (IConversationState)this.applicationContext.GetObject("convCircularDependenceTest_A_A_A"); - StringBuilder sbErrors = new StringBuilder(); - try - { - convCircularDependenceTest_A_A_A.InnerConversations.Add(convCircularDependenceTest_A); - sbErrors.AppendLine("Circular was not detected. "); - } - catch (InvalidOperationException ioe) - { - LOG.Debug("SERVER SIDE ERROR", ioe); - if (!ioe.Message.Contains("convCircularDependenceTest_A_A_A->convCircularDependenceTest_A->convCircularDependenceTest_A_A->convCircularDependenceTest_A_A_A")) - { - sbErrors.AppendLine(String.Format("Wrong CircularDependence message= '{0}'", ioe.Message)); - } - } - catch (Exception ex) - { - LOG.Error("SERVER SIDE ERROR", ex); - sbErrors.AppendLine(String.Format("Unexpected Error: '{0}' \n {1}", ex.Message, ex.StackTrace)); - } - - Session["CircularDependenceTest"] = sbErrors.ToString(); - } - - #region IApplicationContextAware Members - private IApplicationContext applicationContext; - public IApplicationContext ApplicationContext - { - set { this.applicationContext = value; } - } - #endregion -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; +using NUnit.Framework; +using Spring.Context.Support; +using System.Text; +using Common.Logging; +using Spring.Context; + +public partial class CircularDependenceTest : System.Web.UI.Page, IApplicationContextAware +{ + private static readonly ILog LOG = LogManager.GetLogger(typeof(CircularDependenceTest)); + + protected void Page_Load(object sender, EventArgs e) + { + IConversationState convCircularDependenceTest_A = (IConversationState)this.applicationContext.GetObject("convCircularDependenceTest_A"); + IConversationState convCircularDependenceTest_A_A_A = (IConversationState)this.applicationContext.GetObject("convCircularDependenceTest_A_A_A"); + StringBuilder sbErrors = new StringBuilder(); + try + { + convCircularDependenceTest_A_A_A.InnerConversations.Add(convCircularDependenceTest_A); + sbErrors.AppendLine("Circular was not detected. "); + } + catch (InvalidOperationException ioe) + { + LOG.Debug("SERVER SIDE ERROR", ioe); + if (!ioe.Message.Contains("convCircularDependenceTest_A_A_A->convCircularDependenceTest_A->convCircularDependenceTest_A_A->convCircularDependenceTest_A_A_A")) + { + sbErrors.AppendLine(String.Format("Wrong CircularDependence message= '{0}'", ioe.Message)); + } + } + catch (Exception ex) + { + LOG.Error("SERVER SIDE ERROR", ex); + sbErrors.AppendLine(String.Format("Unexpected Error: '{0}' \n {1}", ex.Message, ex.StackTrace)); + } + + Session["CircularDependenceTest"] = sbErrors.ToString(); + } + + #region IApplicationContextAware Members + private IApplicationContext applicationContext; + public IApplicationContext ApplicationContext + { + set { this.applicationContext = value; } + } + #endregion +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/ConnectionReleaseModeIssue.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/ConnectionReleaseModeIssue.aspx similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/ConnectionReleaseModeIssue.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/ConnectionReleaseModeIssue.aspx index 0ec08d1d..f194262c 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/ConnectionReleaseModeIssue.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/ConnectionReleaseModeIssue.aspx @@ -1,16 +1,16 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ConnectionReleaseModeIssue.aspx.cs" Inherits="ConnectionReleaseModeIssue" %> - - - - - - Untitled Page - - -
-
- -
-
- - +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ConnectionReleaseModeIssue.aspx.cs" Inherits="ConnectionReleaseModeIssue" %> + + + + + + Untitled Page + + +
+
+ +
+
+ + diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/ConnectionReleaseModeIssue.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/ConnectionReleaseModeIssue.aspx.cs similarity index 97% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/ConnectionReleaseModeIssue.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/ConnectionReleaseModeIssue.aspx.cs index 96e68174..57477f82 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/ConnectionReleaseModeIssue.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/ConnectionReleaseModeIssue.aspx.cs @@ -1,265 +1,265 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; -using Spring.Data.NHibernate.Support; -using NHibernate; -using Spring.Entities; -using Spring.Spring.Data.Common; -using NUnit.Framework; -using Spring.Bsn; -using NHibernate.Impl; -using System.Reflection; -using NHibernate.Cfg; -using Spring.Context; - -/// -/// Page for . -/// -public partial class ConnectionReleaseModeIssue : System.Web.UI.Page, IApplicationContextAware -{ - private IConversationState conversation; - /// - /// - /// - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - - private ISessionFactory sessionFactory; - public ISessionFactory SessionFactory - { - get { return sessionFactory; } - set { sessionFactory = value; } - } - - - private IConnectionReleaseModeIssueBsn connectionReleaseModeIssueBsn; - public IConnectionReleaseModeIssueBsn ConnectionReleaseModeIssueBsn - { - get { return connectionReleaseModeIssueBsn; } - set { connectionReleaseModeIssueBsn = value; } - } - - protected void Page_Load(object sender, EventArgs e) - { - try - { - /// Test with conversation and "connection.release_mode" - /// "auto"(). - this.connection_release_mode_auto(); - - /// Test with NO conversation and "connection.release_mode" - /// "auto"() - /// on block within the scope of "transaction boundary". - this.connection_release_mode_auto_transaction_boundary(); - - /// Test with NO conversation and "connection.release_mode" - /// "auto"(). - this.connection_release_mode_auto_no_conversation(); - - /// Test with conversation and "connection.release_mode" - /// "on_close"(). - this.connection_release_mode_on_close(); - - Session["result"] = "OK"; - } - catch (Exception ex) - { - Session["result"] = ex.Message + " " + ex.StackTrace; - //throw; - } - } - - /// - /// Test with conversation and "connection.release_mode" - /// "auto"(). - /// - /// - /// Here we can see that every statement causes a closing of the IDbConnection. - /// - private void connection_release_mode_auto() - { - //with conversation and "connection.release_mode" "auto"(AfterTransaction) - //forcing "auto" by reflection. - Settings settings = ((SessionFactoryImpl)this.SessionFactory).Settings; - ConnectionReleaseMode connReleaseModeOriginal = settings.ConnectionReleaseMode; - this.setConnectionReleaseModeByReflection(settings, ConnectionReleaseMode.AfterTransaction); - - //((SessionFactoryImpl)this.sessionFactory).Settings.ConnectionReleaseMode = ConnectionReleaseMode.AfterTransaction; - ConnectionCreationTrackingDbProvider.Count = 0; - this.Conversation.StartResumeConversation(); - ISession sessionA = this.SessionFactory.GetCurrentSession(); - SPCDetailEnt detailEnt = sessionA.Get(1); - Assert.AreEqual(1, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); - - SessionScopeSettings sessionScopeSettings = new SessionScopeSettings(this.sessionFactory); - sessionScopeSettings.SingleSession = true; - SPCMasterEnt masterEnt; - using (new SessionScope(sessionScopeSettings, false)) - { - ISession sessionB = this.SessionFactory.GetCurrentSession(); - - masterEnt = sessionB.Get(1); - Assert.AreEqual(2, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); - - Assert.AreSame(sessionA, sessionB, "sessionA, sessionB"); - } - - SPCMasterEnt masterEnt2 = sessionA.Get(2); - Assert.AreEqual(3, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); - Assert.AreEqual(1, masterEnt2.SPCDetailEntList.Count, "masterEnt2.SPCDetailEntList.Count"); - Assert.AreEqual(4, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); - - SPCMasterEnt masterEnt3 = sessionA.Get(3); - Assert.AreEqual(5, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); - Assert.AreEqual(1, masterEnt3.SPCDetailEntList.Count, "masterEnt3.SPCDetailEntList.Count"); - Assert.AreEqual(6, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); - - - //Renew the conversation. - this.Conversation.EndConversation(); - this.Conversation.ConversationManager.FreeEnded(); - this.Conversation = (IConversationState)this.applicationContext.GetObject("convConnectionReleaseModeIssue"); - - this.setConnectionReleaseModeByReflection(settings, connReleaseModeOriginal); - } - - /// - /// Test with NO conversation and "connection.release_mode" - /// "auto"() - /// on block within the scope of "transaction boundary". - /// - /// - /// Here we can see that only a IDbConnection is open, even - /// with the execution of various statements. This is because - /// the statements are made within a "transaction boundary". - /// - private void connection_release_mode_auto_transaction_boundary() - { - //with conversation and "connection.release_mode" "auto"(AfterTransaction) - //forcing "auto" by reflection. - Settings settings = ((SessionFactoryImpl)this.SessionFactory).Settings; - ConnectionReleaseMode connReleaseModeOriginal = settings.ConnectionReleaseMode; - this.setConnectionReleaseModeByReflection(settings, ConnectionReleaseMode.AfterTransaction); - - ConnectionCreationTrackingDbProvider.Count = 0; - this.ConnectionReleaseModeIssueBsn.Test(); - - this.setConnectionReleaseModeByReflection(settings, connReleaseModeOriginal); - } - - /// - /// Test with NO conversation and "connection.release_mode" - /// "auto"(). - /// - private void connection_release_mode_auto_no_conversation() - { - //with NO conversation and "connection.release_mode" "auto"(AfterTransaction) - //forcing "auto" by reflection. - Settings settings = ((SessionFactoryImpl)this.SessionFactory).Settings; - ConnectionReleaseMode connReleaseModeOriginal = settings.ConnectionReleaseMode; - this.setConnectionReleaseModeByReflection(settings, ConnectionReleaseMode.AfterTransaction); - - //with no conversation - SessionScopeSettings sessionScopeSettings = new SessionScopeSettings(this.sessionFactory); - ConnectionCreationTrackingDbProvider.Count = 0; - using (new SessionScope(sessionScopeSettings, true)) - { - ISession sessionNoConv = this.SessionFactory.GetCurrentSession(); - SPCMasterEnt masterEnt2 = sessionNoConv.Get(2); - Assert.AreEqual(1, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); - Assert.AreEqual(1, masterEnt2.SPCDetailEntList.Count, "masterEnt2.SPCDetailEntList.Count"); - Assert.AreEqual(2, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); - - SPCMasterEnt masterEnt3 = sessionNoConv.Get(3); - Assert.AreEqual(3, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); - Assert.AreEqual(1, masterEnt3.SPCDetailEntList.Count, "masterEnt3.SPCDetailEntList.Count"); - Assert.AreEqual(4, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); - } - - this.setConnectionReleaseModeByReflection(settings, connReleaseModeOriginal); - } - - /// - /// Test with conversation and "connection.release_mode" - /// "on_close"(). - /// - /// - /// Here we can see that only a IDbConnection is open, even - /// with the execution of various statements. - /// - private void connection_release_mode_on_close() - { - //forcing "on_close" by reflection. - Settings settings = ((SessionFactoryImpl)this.SessionFactory).Settings; - ConnectionReleaseMode connReleaseModeOriginal = settings.ConnectionReleaseMode; - this.setConnectionReleaseModeByReflection(settings, ConnectionReleaseMode.OnClose); - - //with conversation and "connection.release_mode" "on_close"(AfterTransaction) - ConnectionCreationTrackingDbProvider.Count = 0; - this.Conversation.StartResumeConversation(); - ISession sessionA = this.SessionFactory.GetCurrentSession(); - SPCDetailEnt detailEnt = sessionA.Get(1); - Assert.AreEqual(1, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); - - SessionScopeSettings sessionScopeSettings = new SessionScopeSettings(this.sessionFactory); - sessionScopeSettings.SingleSession = true; - SPCMasterEnt masterEnt; - using (new SessionScope(sessionScopeSettings, false)) - { - ISession sessionB = this.SessionFactory.GetCurrentSession(); - - masterEnt = sessionB.Get(1); - - Assert.AreSame(sessionA, sessionB, "sessionA, sessionB"); - } - - Assert.AreEqual(3, masterEnt.SPCDetailEntList.Count, "masterEnt.SPCDetailEntList.Count"); - - Assert.AreEqual(1, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); - - //Renew the conversation. - this.Conversation.EndConversation(); - this.Conversation.ConversationManager.FreeEnded(); - this.Conversation = (IConversationState)this.applicationContext.GetObject("convConnectionReleaseModeIssue"); - - this.setConnectionReleaseModeByReflection(settings, connReleaseModeOriginal); - } - - /// - /// Sets the by reflection. - /// - /// The settings. - /// The mode. - private void setConnectionReleaseModeByReflection(Settings settings, ConnectionReleaseMode mode) - { - PropertyInfo pInfoConnectionReleaseMode = - settings.GetType().GetProperty( - "ConnectionReleaseMode", - BindingFlags.Public | - BindingFlags.NonPublic | - BindingFlags.SetProperty | - BindingFlags.Instance); - - pInfoConnectionReleaseMode.SetValue(settings, mode, null); - } - - #region IApplicationContextAware Members - private IApplicationContext applicationContext; - public IApplicationContext ApplicationContext - { - set { this.applicationContext = value; } - } - - #endregion -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; +using Spring.Data.NHibernate.Support; +using NHibernate; +using Spring.Entities; +using Spring.Spring.Data.Common; +using NUnit.Framework; +using Spring.Bsn; +using NHibernate.Impl; +using System.Reflection; +using NHibernate.Cfg; +using Spring.Context; + +/// +/// Page for . +/// +public partial class ConnectionReleaseModeIssue : System.Web.UI.Page, IApplicationContextAware +{ + private IConversationState conversation; + /// + /// + /// + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + + private ISessionFactory sessionFactory; + public ISessionFactory SessionFactory + { + get { return sessionFactory; } + set { sessionFactory = value; } + } + + + private IConnectionReleaseModeIssueBsn connectionReleaseModeIssueBsn; + public IConnectionReleaseModeIssueBsn ConnectionReleaseModeIssueBsn + { + get { return connectionReleaseModeIssueBsn; } + set { connectionReleaseModeIssueBsn = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + try + { + /// Test with conversation and "connection.release_mode" + /// "auto"(). + this.connection_release_mode_auto(); + + /// Test with NO conversation and "connection.release_mode" + /// "auto"() + /// on block within the scope of "transaction boundary". + this.connection_release_mode_auto_transaction_boundary(); + + /// Test with NO conversation and "connection.release_mode" + /// "auto"(). + this.connection_release_mode_auto_no_conversation(); + + /// Test with conversation and "connection.release_mode" + /// "on_close"(). + this.connection_release_mode_on_close(); + + Session["result"] = "OK"; + } + catch (Exception ex) + { + Session["result"] = ex.Message + " " + ex.StackTrace; + //throw; + } + } + + /// + /// Test with conversation and "connection.release_mode" + /// "auto"(). + /// + /// + /// Here we can see that every statement causes a closing of the IDbConnection. + /// + private void connection_release_mode_auto() + { + //with conversation and "connection.release_mode" "auto"(AfterTransaction) + //forcing "auto" by reflection. + Settings settings = ((SessionFactoryImpl)this.SessionFactory).Settings; + ConnectionReleaseMode connReleaseModeOriginal = settings.ConnectionReleaseMode; + this.setConnectionReleaseModeByReflection(settings, ConnectionReleaseMode.AfterTransaction); + + //((SessionFactoryImpl)this.sessionFactory).Settings.ConnectionReleaseMode = ConnectionReleaseMode.AfterTransaction; + ConnectionCreationTrackingDbProvider.Count = 0; + this.Conversation.StartResumeConversation(); + ISession sessionA = this.SessionFactory.GetCurrentSession(); + SPCDetailEnt detailEnt = sessionA.Get(1); + Assert.AreEqual(1, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); + + SessionScopeSettings sessionScopeSettings = new SessionScopeSettings(this.sessionFactory); + sessionScopeSettings.SingleSession = true; + SPCMasterEnt masterEnt; + using (new SessionScope(sessionScopeSettings, false)) + { + ISession sessionB = this.SessionFactory.GetCurrentSession(); + + masterEnt = sessionB.Get(1); + Assert.AreEqual(2, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); + + Assert.AreSame(sessionA, sessionB, "sessionA, sessionB"); + } + + SPCMasterEnt masterEnt2 = sessionA.Get(2); + Assert.AreEqual(3, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); + Assert.AreEqual(1, masterEnt2.SPCDetailEntList.Count, "masterEnt2.SPCDetailEntList.Count"); + Assert.AreEqual(4, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); + + SPCMasterEnt masterEnt3 = sessionA.Get(3); + Assert.AreEqual(5, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); + Assert.AreEqual(1, masterEnt3.SPCDetailEntList.Count, "masterEnt3.SPCDetailEntList.Count"); + Assert.AreEqual(6, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); + + + //Renew the conversation. + this.Conversation.EndConversation(); + this.Conversation.ConversationManager.FreeEnded(); + this.Conversation = (IConversationState)this.applicationContext.GetObject("convConnectionReleaseModeIssue"); + + this.setConnectionReleaseModeByReflection(settings, connReleaseModeOriginal); + } + + /// + /// Test with NO conversation and "connection.release_mode" + /// "auto"() + /// on block within the scope of "transaction boundary". + /// + /// + /// Here we can see that only a IDbConnection is open, even + /// with the execution of various statements. This is because + /// the statements are made within a "transaction boundary". + /// + private void connection_release_mode_auto_transaction_boundary() + { + //with conversation and "connection.release_mode" "auto"(AfterTransaction) + //forcing "auto" by reflection. + Settings settings = ((SessionFactoryImpl)this.SessionFactory).Settings; + ConnectionReleaseMode connReleaseModeOriginal = settings.ConnectionReleaseMode; + this.setConnectionReleaseModeByReflection(settings, ConnectionReleaseMode.AfterTransaction); + + ConnectionCreationTrackingDbProvider.Count = 0; + this.ConnectionReleaseModeIssueBsn.Test(); + + this.setConnectionReleaseModeByReflection(settings, connReleaseModeOriginal); + } + + /// + /// Test with NO conversation and "connection.release_mode" + /// "auto"(). + /// + private void connection_release_mode_auto_no_conversation() + { + //with NO conversation and "connection.release_mode" "auto"(AfterTransaction) + //forcing "auto" by reflection. + Settings settings = ((SessionFactoryImpl)this.SessionFactory).Settings; + ConnectionReleaseMode connReleaseModeOriginal = settings.ConnectionReleaseMode; + this.setConnectionReleaseModeByReflection(settings, ConnectionReleaseMode.AfterTransaction); + + //with no conversation + SessionScopeSettings sessionScopeSettings = new SessionScopeSettings(this.sessionFactory); + ConnectionCreationTrackingDbProvider.Count = 0; + using (new SessionScope(sessionScopeSettings, true)) + { + ISession sessionNoConv = this.SessionFactory.GetCurrentSession(); + SPCMasterEnt masterEnt2 = sessionNoConv.Get(2); + Assert.AreEqual(1, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); + Assert.AreEqual(1, masterEnt2.SPCDetailEntList.Count, "masterEnt2.SPCDetailEntList.Count"); + Assert.AreEqual(2, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); + + SPCMasterEnt masterEnt3 = sessionNoConv.Get(3); + Assert.AreEqual(3, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); + Assert.AreEqual(1, masterEnt3.SPCDetailEntList.Count, "masterEnt3.SPCDetailEntList.Count"); + Assert.AreEqual(4, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); + } + + this.setConnectionReleaseModeByReflection(settings, connReleaseModeOriginal); + } + + /// + /// Test with conversation and "connection.release_mode" + /// "on_close"(). + /// + /// + /// Here we can see that only a IDbConnection is open, even + /// with the execution of various statements. + /// + private void connection_release_mode_on_close() + { + //forcing "on_close" by reflection. + Settings settings = ((SessionFactoryImpl)this.SessionFactory).Settings; + ConnectionReleaseMode connReleaseModeOriginal = settings.ConnectionReleaseMode; + this.setConnectionReleaseModeByReflection(settings, ConnectionReleaseMode.OnClose); + + //with conversation and "connection.release_mode" "on_close"(AfterTransaction) + ConnectionCreationTrackingDbProvider.Count = 0; + this.Conversation.StartResumeConversation(); + ISession sessionA = this.SessionFactory.GetCurrentSession(); + SPCDetailEnt detailEnt = sessionA.Get(1); + Assert.AreEqual(1, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); + + SessionScopeSettings sessionScopeSettings = new SessionScopeSettings(this.sessionFactory); + sessionScopeSettings.SingleSession = true; + SPCMasterEnt masterEnt; + using (new SessionScope(sessionScopeSettings, false)) + { + ISession sessionB = this.SessionFactory.GetCurrentSession(); + + masterEnt = sessionB.Get(1); + + Assert.AreSame(sessionA, sessionB, "sessionA, sessionB"); + } + + Assert.AreEqual(3, masterEnt.SPCDetailEntList.Count, "masterEnt.SPCDetailEntList.Count"); + + Assert.AreEqual(1, ConnectionCreationTrackingDbProvider.Count, "ConnectionCreationTrackingDbProvider.Count"); + + //Renew the conversation. + this.Conversation.EndConversation(); + this.Conversation.ConversationManager.FreeEnded(); + this.Conversation = (IConversationState)this.applicationContext.GetObject("convConnectionReleaseModeIssue"); + + this.setConnectionReleaseModeByReflection(settings, connReleaseModeOriginal); + } + + /// + /// Sets the by reflection. + /// + /// The settings. + /// The mode. + private void setConnectionReleaseModeByReflection(Settings settings, ConnectionReleaseMode mode) + { + PropertyInfo pInfoConnectionReleaseMode = + settings.GetType().GetProperty( + "ConnectionReleaseMode", + BindingFlags.Public | + BindingFlags.NonPublic | + BindingFlags.SetProperty | + BindingFlags.Instance); + + pInfoConnectionReleaseMode.SetValue(settings, mode, null); + } + + #region IApplicationContextAware Members + private IApplicationContext applicationContext; + public IApplicationContext ApplicationContext + { + set { this.applicationContext = value; } + } + + #endregion +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestBegin.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestBegin.aspx similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestBegin.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestBegin.aspx index 28e2e284..6bae8f3e 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestBegin.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestBegin.aspx @@ -1,3 +1,3 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EndConversationTestBegin.aspx.cs" Inherits="EndConversationTestBegin" %><% -Response.Write("OK"); +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EndConversationTestBegin.aspx.cs" Inherits="EndConversationTestBegin" %><% +Response.Write("OK"); %> \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestBegin.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestBegin.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestBegin.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestBegin.aspx.cs index 7d937e5e..8bd19962 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestBegin.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestBegin.aspx.cs @@ -1,37 +1,37 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; -using Spring.Bsn; - -public partial class EndConversationTestBegin : System.Web.UI.Page -{ - private IConversationEvidenceBsn conversationEvidenceBsn; - public IConversationEvidenceBsn ConversationEvidenceBsn - { - get { return conversationEvidenceBsn; } - set { conversationEvidenceBsn = value; } - } - - - private IConversationState conversation; - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - - protected void Page_Load(object sender, EventArgs e) - { - this.Conversation.StartResumeConversation(); - - Session["ConversationEvidenceBsn_UniqId"] = this.ConversationEvidenceBsn.UniqueId(); - } -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; +using Spring.Bsn; + +public partial class EndConversationTestBegin : System.Web.UI.Page +{ + private IConversationEvidenceBsn conversationEvidenceBsn; + public IConversationEvidenceBsn ConversationEvidenceBsn + { + get { return conversationEvidenceBsn; } + set { conversationEvidenceBsn = value; } + } + + + private IConversationState conversation; + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + this.Conversation.StartResumeConversation(); + + Session["ConversationEvidenceBsn_UniqId"] = this.ConversationEvidenceBsn.UniqueId(); + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestEnd.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestEnd.aspx similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestEnd.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestEnd.aspx index 13a43a2c..37f7a37f 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestEnd.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestEnd.aspx @@ -1,3 +1,3 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EndConversationTestEnd.aspx.cs" Inherits="EndConversationTestEnd" %><% -Response.Write("OK"); +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EndConversationTestEnd.aspx.cs" Inherits="EndConversationTestEnd" %><% +Response.Write("OK"); %> \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestEnd.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestEnd.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestEnd.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestEnd.aspx.cs index 63768540..72169e2c 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestEnd.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndConversationTestEnd.aspx.cs @@ -1,35 +1,35 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.Bsn; -using Spring.ConversationWA; - -public partial class EndConversationTestEnd : System.Web.UI.Page -{ - private IConversationEvidenceBsn conversationEvidenceBsn; - public IConversationEvidenceBsn ConversationEvidenceBsn - { - get { return conversationEvidenceBsn; } - set { conversationEvidenceBsn = value; } - } - - - private IConversationState conversation; - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - - protected void Page_Load(object sender, EventArgs e) - { - this.Conversation.EndConversation(); - } -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.Bsn; +using Spring.ConversationWA; + +public partial class EndConversationTestEnd : System.Web.UI.Page +{ + private IConversationEvidenceBsn conversationEvidenceBsn; + public IConversationEvidenceBsn ConversationEvidenceBsn + { + get { return conversationEvidenceBsn; } + set { conversationEvidenceBsn = value; } + } + + + private IConversationState conversation; + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + this.Conversation.EndConversation(); + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedA.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedA.aspx similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedA.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedA.aspx index af200f39..c58457fc 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedA.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedA.aspx @@ -1,16 +1,16 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EndPausedSessionIsClosedA.aspx.cs"Inherits="EndPausedSessionIsClosedA" %> - - - - - - Untitled Page - - -
-
- -
-
- - +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EndPausedSessionIsClosedA.aspx.cs"Inherits="EndPausedSessionIsClosedA" %> + + + + + + Untitled Page + + +
+
+ +
+
+ + diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedA.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedA.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedA.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedA.aspx.cs index 3671ab3b..93cf58b7 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedA.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedA.aspx.cs @@ -1,40 +1,40 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; -using Spring.Entities; -using NHibernate; - -public partial class EndPausedSessionIsClosedA : System.Web.UI.Page -{ - - private IConversationState conversation; - /// - /// - /// - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - - protected void Page_Load(object sender, EventArgs e) - { - this.Session["result"] = "NOT OK"; - - this.Conversation.StartResumeConversation(); - - //database access - ISession session = this.Conversation.SessionFactory.GetCurrentSession(); - SPCMasterEnt sPCMasterEnt = session.Get(1); - - this.Session["result"] = "OK"; - } -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; +using Spring.Entities; +using NHibernate; + +public partial class EndPausedSessionIsClosedA : System.Web.UI.Page +{ + + private IConversationState conversation; + /// + /// + /// + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + this.Session["result"] = "NOT OK"; + + this.Conversation.StartResumeConversation(); + + //database access + ISession session = this.Conversation.SessionFactory.GetCurrentSession(); + SPCMasterEnt sPCMasterEnt = session.Get(1); + + this.Session["result"] = "OK"; + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedB.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedB.aspx similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedB.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedB.aspx index 21987f26..0a1e487c 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedB.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedB.aspx @@ -1,16 +1,16 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EndPausedSessionIsClosedB.aspx.cs"Inherits="EndPausedSessionIsClosedB" %> - - - - - - Untitled Page - - -
-
- -
-
- - +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EndPausedSessionIsClosedB.aspx.cs"Inherits="EndPausedSessionIsClosedB" %> + + + + + + Untitled Page + + +
+
+ +
+
+ + diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedB.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedB.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedB.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedB.aspx.cs index 1c13094d..d0e0a17d 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedB.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedSessionIsClosedB.aspx.cs @@ -1,46 +1,46 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; -using NHibernate; -using Spring.Entities; - -public partial class EndPausedSessionIsClosedB : System.Web.UI.Page -{ - private IConversationState conversation; - /// - /// - /// - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - - protected void Page_Load(object sender, EventArgs e) - { - this.Session["result"] = "NOT OK"; - - try - { - this.Conversation.StartResumeConversation(); - - //database access - ISession session = this.Conversation.SessionFactory.GetCurrentSession(); - SPCMasterEnt sPCMasterEnt = session.Get(1); - - this.Session["result"] = "OK"; - } - catch (Exception ex) - { - this.Session["result"] = ex.Message; - } - } -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; +using NHibernate; +using Spring.Entities; + +public partial class EndPausedSessionIsClosedB : System.Web.UI.Page +{ + private IConversationState conversation; + /// + /// + /// + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + this.Session["result"] = "NOT OK"; + + try + { + this.Conversation.StartResumeConversation(); + + //database access + ISession session = this.Conversation.SessionFactory.GetCurrentSession(); + SPCMasterEnt sPCMasterEnt = session.Get(1); + + this.Session["result"] = "OK"; + } + catch (Exception ex) + { + this.Session["result"] = ex.Message; + } + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedTest.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedTest.aspx similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedTest.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedTest.aspx index a55709b1..b0fb1407 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedTest.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedTest.aspx @@ -1,16 +1,16 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EndPausedTest.aspx.cs" Inherits="EndPausedTest" %> - - - - - - Untitled Page - - -
-
- -
-
- - +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EndPausedTest.aspx.cs" Inherits="EndPausedTest" %> + + + + + + Untitled Page + + +
+
+ +
+
+ + diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedTest.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedTest.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedTest.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedTest.aspx.cs index 3814e5d5..e6818adf 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedTest.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/EndPausedTest.aspx.cs @@ -1,48 +1,48 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; - -public partial class EndPausedTest : System.Web.UI.Page -{ - private IConversationState convA; - - public IConversationState ConvA - { - get { return convA; } - set { convA = value; } - } - private IConversationState convB; - - public IConversationState ConvB - { - get { return convB; } - set { convB = value; } - } - - protected void Page_Load(object sender, EventArgs e) - { - if (this.Request["testPhase"] == "begin") - { - if (!this.convA.Ended && !this.convB.Ended) - this.Session["result"] = "OK"; - else - this.Session["result"] = "(!this.convA.Ended && !this.convB.Ended) is false"; - } - else if (this.Request["testPhase"] == "startConvA") - { - this.convA.StartResumeConversation(); - if (!this.convA.Ended && this.convB.Ended) - this.Session["result"] = "OK"; - else - this.Session["result"] = "(!this.convA.Ended && this.convB.Ended) is false"; - } - } -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; + +public partial class EndPausedTest : System.Web.UI.Page +{ + private IConversationState convA; + + public IConversationState ConvA + { + get { return convA; } + set { convA = value; } + } + private IConversationState convB; + + public IConversationState ConvB + { + get { return convB; } + set { convB = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + if (this.Request["testPhase"] == "begin") + { + if (!this.convA.Ended && !this.convB.Ended) + this.Session["result"] = "OK"; + else + this.Session["result"] = "(!this.convA.Ended && !this.convB.Ended) is false"; + } + else if (this.Request["testPhase"] == "startConvA") + { + this.convA.StartResumeConversation(); + if (!this.convA.Ended && this.convB.Ended) + this.Session["result"] = "OK"; + else + this.Session["result"] = "(!this.convA.Ended && this.convB.Ended) is false"; + } + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/GetParentObjetFromChild.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/GetParentObjetFromChild.aspx similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/GetParentObjetFromChild.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/GetParentObjetFromChild.aspx index b5e2cdc3..bf7bc398 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/GetParentObjetFromChild.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/GetParentObjetFromChild.aspx @@ -1,3 +1,3 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GetParentObjetFromChild.aspx.cs" Inherits="GetParentObjetFromChild" %><% -Response.Write("OK"); +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GetParentObjetFromChild.aspx.cs" Inherits="GetParentObjetFromChild" %><% +Response.Write("OK"); %> \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/GetParentObjetFromChild.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/GetParentObjetFromChild.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/GetParentObjetFromChild.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/GetParentObjetFromChild.aspx.cs index 3a323427..74c42826 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/GetParentObjetFromChild.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/GetParentObjetFromChild.aspx.cs @@ -1,30 +1,30 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; - -public partial class GetParentObjetFromChild : System.Web.UI.Page -{ - private IConversationState conversation; - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - - protected void Page_Load(object sender, EventArgs e) - { - this.Conversation.StartResumeConversation(); - - Session["parentKey"] = this.Conversation["parentKey"]; - Session["childKey"] = this.Conversation["childKey"]; - Session["overwrittenKey"] = this.Conversation["overwrittenKey"]; - } -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; + +public partial class GetParentObjetFromChild : System.Web.UI.Page +{ + private IConversationState conversation; + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + this.Conversation.StartResumeConversation(); + + Session["parentKey"] = this.Conversation["parentKey"]; + Session["childKey"] = this.Conversation["childKey"]; + Session["overwrittenKey"] = this.Conversation["overwrittenKey"]; + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/IoeTests.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/IoeTests.aspx similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/IoeTests.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/IoeTests.aspx index 044b21f4..c7e497f8 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/IoeTests.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/IoeTests.aspx @@ -1,3 +1,3 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="IoeTests.aspx.cs" Inherits="IoeTests" %><% -Response.Write("OK"); +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="IoeTests.aspx.cs" Inherits="IoeTests" %><% +Response.Write("OK"); %> \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/IoeTests.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/IoeTests.aspx.cs similarity index 97% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/IoeTests.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/IoeTests.aspx.cs index 166ee485..f4d9f887 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/IoeTests.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/IoeTests.aspx.cs @@ -1,466 +1,466 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; -using Spring.ConversationWA.Impl; -using System.Text.RegularExpressions; -using NHibernate; -using Spring.Data.NHibernate.Support; -using Common.Logging; -using Spring.Objects.Factory; - -public partial class IoeTests : System.Web.UI.Page -{ - private static readonly ILog LOG = LogManager.GetLogger(typeof(IoeTests)); - - private IConversationState conversationA; - public IConversationState ConversationA - { - get { return conversationA; } - set { conversationA = value; } - } - private IConversationState conversationAA; - public IConversationState ConversationAA - { - get { return conversationAA; } - set { conversationAA = value; } - } - - private IConversationManager conversationManager; - public IConversationManager ConversationManager - { - get { return conversationManager; } - set { conversationManager = value; } - } - - private ISessionFactory sessionFactory; - public ISessionFactory SessionFactory - { - get { return sessionFactory; } - set { sessionFactory = value; } - } - - protected void Page_Load(object sender, EventArgs e) - { - try - { - if ("reset".Equals(this.Request.Params["test"])) - { - this.ConversationA.EndConversation(); - this.Session["testResult"] = "OK"; - } - else if ("alreadyHasAnotherManagerNotRaise".Equals(this.Request.Params["test"])) - { - this.alreadyHasAnotherManagerNotRaise(); - } - else if ("alreadyHasAnotherManagerRaise".Equals(this.Request.Params["test"])) - { - this.alreadyHasAnotherManagerRaise(); - } - else if ("conversationAlreadyDifferentParent".Equals(this.Request.Params["test"])) - { - this.conversationAlreadyDifferentParent(); - } - else if ("setParentConversationIsNotNew".Equals(this.Request.Params["test"])) - { - this.setParentConversationIsNotNew(); - } - else if ("startResumeConversationIsEnded".Equals(this.Request.Params["test"])) - { - this.startResumeConversationIsEnded(); - } - else if ("participatingHibernateNotAlowed".Equals(this.Request.Params["test"])) - { - this.participatingHibernateNotAlowed(); - } - else if ("idIsDifferentFromSpringName".Equals(this.Request.Params["test"])) - { - this.idIsDifferentFromSpringName(); - } - else - { - throw new Exception("'test' request parameter was not recognized"); - } - } - catch (Exception ex) - { - this.Session["testResult"] = "FAIL: " + ex.ToString(); - } - } - - private void alreadyHasAnotherManagerNotRaise() - { - IConversationManager otherConversationManager = new WebConversationManager(); - - //Not raise error - IConversationState otherConversationState = null; - try - { - otherConversationState = new WebConversationSpringState(); - otherConversationState.Id = "otherConversationState"; - otherConversationManager.AddConversation(otherConversationState); - this.Session["testResult"] = "OK"; - } - catch (InvalidOperationException ioe) - { - this.Session["testResult"] = "NOT OK " + ioe.ToString(); - } - finally - { - otherConversationState.EndConversation(); - } - } - - private void alreadyHasAnotherManagerRaise() - { - Regex msgErrorRx = new Regex(".*already.*has.*another.*manager.*"); - IConversationManager otherConversationManager = null; - - //Raise error - try - { - otherConversationManager = new WebConversationManager(); - otherConversationManager.AddConversation(this.ConversationA); - this.Session["testResult"] = "NOT OK"; - } - catch (InvalidOperationException ioe) - { - if (msgErrorRx.IsMatch(ioe.Message)) - { - this.Session["testResult"] = "OK"; - } - else - { - this.Session["testResult"] = "NOT OK " + ioe.Message; - } - } - } - - private void conversationAlreadyDifferentParent() - { - Regex msgErrorRx = new Regex(".*conversation.*already.*different.*parent.*"); - //BEGIN: Raise error - IConversationState otherConversationState = null; - try - { - otherConversationState = new WebConversationSpringState(); - otherConversationState.Id = "otherConversationState"; - //try first by 'InnerConversations.Add' - otherConversationState.InnerConversations.Add(this.ConversationAA); - throw new Exception("NOT OK: No raise for 'InnerConversations.Add(this.ConversationAA)'"); - } - catch (InvalidOperationException ioe) - { - if (msgErrorRx.IsMatch(ioe.Message)) - { - this.Session["testResult"] = "OK"; - } - else - { - throw new Exception("NOT OK " + ioe.Message); - } - } - finally - { - otherConversationState.EndConversation(); - } - - try - { - otherConversationState = new WebConversationSpringState(); - otherConversationState.Id = "otherConversationState"; - //try second by 'ParentConversation = ' - this.ConversationAA.ParentConversation = otherConversationState; - throw new Exception("NOT OK: No raise for 'this.ConversationAA.ParentConversation = otherConversationState'"); - } - catch (InvalidOperationException ioe) - { - if (msgErrorRx.IsMatch(ioe.Message)) - { - this.Session["testResult"] = "OK"; - } - else - { - throw new Exception("NOT OK, 'ex.Message' not match :" + ioe.Message); - } - } - finally - { - otherConversationState.EndConversation(); - } - //END: Raise error - - //BEGIN: NO Raise error - otherConversationState = null; - try - { - otherConversationState = new WebConversationSpringState(); - otherConversationState.Id = "otherConversationState"; - //try first by 'InnerConversations.Add' - this.ConversationAA.InnerConversations.Add(otherConversationState); - this.Session["testResult"] = "OK"; - } - finally - { - otherConversationState.EndConversation(); - } - - try - { - otherConversationState = new WebConversationSpringState(); - otherConversationState.Id = "otherConversationState"; - //try second by 'ParentConversation = ' - otherConversationState.ParentConversation = this.ConversationA; - this.Session["testResult"] = "OK"; - } - finally - { - otherConversationState.EndConversation(); - } - //END: NO Raise error - } - - private void setParentConversationIsNotNew() - { - Regex msgErrorRx = new Regex(".*Conversation.*not.*new.*Conversation.Id.*Parent.*Tried.*"); - IConversationState otherConversationState = null; - //BEGIN: Raise error - try - { - otherConversationState = new WebConversationSpringState(); - otherConversationState.Id = "otherConversationState"; - // make not new - otherConversationState.StartResumeConversation(); - //try first by 'InnerConversations.Add' - this.ConversationA.InnerConversations.Add(otherConversationState); - throw new Exception("NOT OK: No raise for 'this.ConversationA.InnerConversations.Add(otherConversationState)'"); - } - catch (InvalidOperationException ioe) - { - if (msgErrorRx.IsMatch(ioe.Message)) - { - this.Session["testResult"] = "OK"; - } - else - { - throw new Exception("NOT OK " + ioe.Message); - } - } - finally - { - otherConversationState.EndConversation(); - } - - try - { - otherConversationState = new WebConversationSpringState(); - otherConversationState.Id = "otherConversationState"; - // make not new - otherConversationState.StartResumeConversation(); - //try second by 'ParentConversation = ' - otherConversationState.ParentConversation = this.ConversationA; - throw new Exception("NOT OK: No raise for 'this.ConversationAA.ParentConversation = otherConversationState'"); - } - catch (InvalidOperationException ioe) - { - if (msgErrorRx.IsMatch(ioe.Message)) - { - this.Session["testResult"] = "OK"; - } - else - { - throw new Exception("NOT OK, 'ex.Message' not match :" + ioe.Message); - } - } - finally - { - otherConversationState.EndConversation(); - } - //END: Raise error - - //BEGIN: NO Raise error - try - { - otherConversationState = new WebConversationSpringState(); - otherConversationState.Id = "otherConversationState"; - // leave new - //try first by 'InnerConversations.Add' - this.ConversationA.InnerConversations.Add(otherConversationState); - this.Session["testResult"] = "OK"; - } - finally - { - otherConversationState.EndConversation(); - } - - try - { - otherConversationState = new WebConversationSpringState(); - otherConversationState.Id = "otherConversationState"; - // leave new - //try second by 'ParentConversation = ' - otherConversationState.ParentConversation = this.ConversationA; - this.Session["testResult"] = "OK"; - } - finally - { - otherConversationState.EndConversation(); - } - //END: NO Raise error - } - - private void startResumeConversationIsEnded() - { - Regex msgErrorRx = new Regex(".*StartResumeConversation.*conversation.*is.*ended.*"); - IConversationState otherConversationState = null; - //BEGIN: Raise error - try - { - otherConversationState = new WebConversationSpringState(); - otherConversationState.Id = "otherConversationState"; - // make not new - otherConversationState.EndConversation(); - otherConversationState.StartResumeConversation(); - throw new Exception("NOT OK: No raise for 'otherConversationState.StartResumeConversation()'"); - } - catch (InvalidOperationException ioe) - { - if (msgErrorRx.IsMatch(ioe.Message)) - { - this.Session["testResult"] = "OK"; - } - else - { - throw new Exception("NOT OK " + ioe.Message); - } - } - finally - { - otherConversationState.EndConversation(); - } - //END: Raise error - - //BEGIN: NO Raise error - try - { - otherConversationState = new WebConversationSpringState(); - otherConversationState.Id = "otherConversationState"; - // make not new - otherConversationState.StartResumeConversation(); - otherConversationState.EndConversation(); - this.Session["testResult"] = "OK"; - } - finally - { - otherConversationState.EndConversation(); - } - //END: NO Raise error - } - - private void participatingHibernateNotAlowed() - { - Regex msgErrorRx = new Regex(".*Participating.*Hibernate.*NOT.*ALLOWED.*"); - try - { - //No raise - this.ConversationA.StartResumeConversation(); - ISession session = this.SessionFactory.GetCurrentSession(); - this.ConversationManager.FreeEnded(); - this.ConversationManager.PauseConversations(); - this.Session["testResult"] = "OK"; - } - finally - { - this.ConversationManager.FreeEnded(); - this.ConversationManager.PauseConversations(); - } - - try - { - //Raise - this.ConversationA.StartResumeConversation(); - this.ConversationManager.FreeEnded(); - this.ConversationManager.PauseConversations(); - - SessionScopeSettings sessionScopeSettings = new SessionScopeSettings(this.sessionFactory); - sessionScopeSettings.SingleSession = true; - using (new SessionScope(sessionScopeSettings, true)) - { - ISession session = this.SessionFactory.GetCurrentSession(); - this.ConversationA.StartResumeConversation(); - } - throw new Exception("NOT OK: No raise for 'this.ConversationA.StartResumeConversation()'"); - } - catch (InvalidOperationException ioe) - { - if (msgErrorRx.IsMatch(ioe.Message)) - { - this.Session["testResult"] = "OK"; - } - else - { - throw new Exception("NOT OK " + ioe.Message); - } - } - finally - { - this.ConversationManager.FreeEnded(); - this.ConversationManager.PauseConversations(); - } - - } - - private void idIsDifferentFromSpringName() - { - Regex msgErrorRx = new Regex(".*Id.*is.*different.*from.*spring.*name.*"); - IConversationState otherConversationState = null; - //BEGIN: Raise error - try - { - otherConversationState = new WebConversationSpringState(); - otherConversationState.Id = "otherConversationState"; - // different name - ((IObjectNameAware)otherConversationState).ObjectName = "different_name"; - throw new Exception("NOT OK: No raise for '((IObjectNameAware)otherConversationState).ObjectName ='"); - } - catch (InvalidOperationException ioe) - { - if (msgErrorRx.IsMatch(ioe.Message)) - { - this.Session["testResult"] = "OK"; - } - else - { - throw new Exception("NOT OK " + ioe.Message); - } - } - finally - { - otherConversationState.EndConversation(); - } - //END: Raise error - - //BEGIN: NO Raise error - try - { - otherConversationState = new WebConversationSpringState(); - otherConversationState.Id = "otherConversationState"; - // make not new - // different name - ((IObjectNameAware)otherConversationState).ObjectName = "otherConversationState"; - this.Session["testResult"] = "OK"; - } - finally - { - otherConversationState.EndConversation(); - } - //END: NO Raise error - } +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; +using Spring.ConversationWA.Impl; +using System.Text.RegularExpressions; +using NHibernate; +using Spring.Data.NHibernate.Support; +using Common.Logging; +using Spring.Objects.Factory; + +public partial class IoeTests : System.Web.UI.Page +{ + private static readonly ILog LOG = LogManager.GetLogger(typeof(IoeTests)); + + private IConversationState conversationA; + public IConversationState ConversationA + { + get { return conversationA; } + set { conversationA = value; } + } + private IConversationState conversationAA; + public IConversationState ConversationAA + { + get { return conversationAA; } + set { conversationAA = value; } + } + + private IConversationManager conversationManager; + public IConversationManager ConversationManager + { + get { return conversationManager; } + set { conversationManager = value; } + } + + private ISessionFactory sessionFactory; + public ISessionFactory SessionFactory + { + get { return sessionFactory; } + set { sessionFactory = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + try + { + if ("reset".Equals(this.Request.Params["test"])) + { + this.ConversationA.EndConversation(); + this.Session["testResult"] = "OK"; + } + else if ("alreadyHasAnotherManagerNotRaise".Equals(this.Request.Params["test"])) + { + this.alreadyHasAnotherManagerNotRaise(); + } + else if ("alreadyHasAnotherManagerRaise".Equals(this.Request.Params["test"])) + { + this.alreadyHasAnotherManagerRaise(); + } + else if ("conversationAlreadyDifferentParent".Equals(this.Request.Params["test"])) + { + this.conversationAlreadyDifferentParent(); + } + else if ("setParentConversationIsNotNew".Equals(this.Request.Params["test"])) + { + this.setParentConversationIsNotNew(); + } + else if ("startResumeConversationIsEnded".Equals(this.Request.Params["test"])) + { + this.startResumeConversationIsEnded(); + } + else if ("participatingHibernateNotAlowed".Equals(this.Request.Params["test"])) + { + this.participatingHibernateNotAlowed(); + } + else if ("idIsDifferentFromSpringName".Equals(this.Request.Params["test"])) + { + this.idIsDifferentFromSpringName(); + } + else + { + throw new Exception("'test' request parameter was not recognized"); + } + } + catch (Exception ex) + { + this.Session["testResult"] = "FAIL: " + ex.ToString(); + } + } + + private void alreadyHasAnotherManagerNotRaise() + { + IConversationManager otherConversationManager = new WebConversationManager(); + + //Not raise error + IConversationState otherConversationState = null; + try + { + otherConversationState = new WebConversationSpringState(); + otherConversationState.Id = "otherConversationState"; + otherConversationManager.AddConversation(otherConversationState); + this.Session["testResult"] = "OK"; + } + catch (InvalidOperationException ioe) + { + this.Session["testResult"] = "NOT OK " + ioe.ToString(); + } + finally + { + otherConversationState.EndConversation(); + } + } + + private void alreadyHasAnotherManagerRaise() + { + Regex msgErrorRx = new Regex(".*already.*has.*another.*manager.*"); + IConversationManager otherConversationManager = null; + + //Raise error + try + { + otherConversationManager = new WebConversationManager(); + otherConversationManager.AddConversation(this.ConversationA); + this.Session["testResult"] = "NOT OK"; + } + catch (InvalidOperationException ioe) + { + if (msgErrorRx.IsMatch(ioe.Message)) + { + this.Session["testResult"] = "OK"; + } + else + { + this.Session["testResult"] = "NOT OK " + ioe.Message; + } + } + } + + private void conversationAlreadyDifferentParent() + { + Regex msgErrorRx = new Regex(".*conversation.*already.*different.*parent.*"); + //BEGIN: Raise error + IConversationState otherConversationState = null; + try + { + otherConversationState = new WebConversationSpringState(); + otherConversationState.Id = "otherConversationState"; + //try first by 'InnerConversations.Add' + otherConversationState.InnerConversations.Add(this.ConversationAA); + throw new Exception("NOT OK: No raise for 'InnerConversations.Add(this.ConversationAA)'"); + } + catch (InvalidOperationException ioe) + { + if (msgErrorRx.IsMatch(ioe.Message)) + { + this.Session["testResult"] = "OK"; + } + else + { + throw new Exception("NOT OK " + ioe.Message); + } + } + finally + { + otherConversationState.EndConversation(); + } + + try + { + otherConversationState = new WebConversationSpringState(); + otherConversationState.Id = "otherConversationState"; + //try second by 'ParentConversation = ' + this.ConversationAA.ParentConversation = otherConversationState; + throw new Exception("NOT OK: No raise for 'this.ConversationAA.ParentConversation = otherConversationState'"); + } + catch (InvalidOperationException ioe) + { + if (msgErrorRx.IsMatch(ioe.Message)) + { + this.Session["testResult"] = "OK"; + } + else + { + throw new Exception("NOT OK, 'ex.Message' not match :" + ioe.Message); + } + } + finally + { + otherConversationState.EndConversation(); + } + //END: Raise error + + //BEGIN: NO Raise error + otherConversationState = null; + try + { + otherConversationState = new WebConversationSpringState(); + otherConversationState.Id = "otherConversationState"; + //try first by 'InnerConversations.Add' + this.ConversationAA.InnerConversations.Add(otherConversationState); + this.Session["testResult"] = "OK"; + } + finally + { + otherConversationState.EndConversation(); + } + + try + { + otherConversationState = new WebConversationSpringState(); + otherConversationState.Id = "otherConversationState"; + //try second by 'ParentConversation = ' + otherConversationState.ParentConversation = this.ConversationA; + this.Session["testResult"] = "OK"; + } + finally + { + otherConversationState.EndConversation(); + } + //END: NO Raise error + } + + private void setParentConversationIsNotNew() + { + Regex msgErrorRx = new Regex(".*Conversation.*not.*new.*Conversation.Id.*Parent.*Tried.*"); + IConversationState otherConversationState = null; + //BEGIN: Raise error + try + { + otherConversationState = new WebConversationSpringState(); + otherConversationState.Id = "otherConversationState"; + // make not new + otherConversationState.StartResumeConversation(); + //try first by 'InnerConversations.Add' + this.ConversationA.InnerConversations.Add(otherConversationState); + throw new Exception("NOT OK: No raise for 'this.ConversationA.InnerConversations.Add(otherConversationState)'"); + } + catch (InvalidOperationException ioe) + { + if (msgErrorRx.IsMatch(ioe.Message)) + { + this.Session["testResult"] = "OK"; + } + else + { + throw new Exception("NOT OK " + ioe.Message); + } + } + finally + { + otherConversationState.EndConversation(); + } + + try + { + otherConversationState = new WebConversationSpringState(); + otherConversationState.Id = "otherConversationState"; + // make not new + otherConversationState.StartResumeConversation(); + //try second by 'ParentConversation = ' + otherConversationState.ParentConversation = this.ConversationA; + throw new Exception("NOT OK: No raise for 'this.ConversationAA.ParentConversation = otherConversationState'"); + } + catch (InvalidOperationException ioe) + { + if (msgErrorRx.IsMatch(ioe.Message)) + { + this.Session["testResult"] = "OK"; + } + else + { + throw new Exception("NOT OK, 'ex.Message' not match :" + ioe.Message); + } + } + finally + { + otherConversationState.EndConversation(); + } + //END: Raise error + + //BEGIN: NO Raise error + try + { + otherConversationState = new WebConversationSpringState(); + otherConversationState.Id = "otherConversationState"; + // leave new + //try first by 'InnerConversations.Add' + this.ConversationA.InnerConversations.Add(otherConversationState); + this.Session["testResult"] = "OK"; + } + finally + { + otherConversationState.EndConversation(); + } + + try + { + otherConversationState = new WebConversationSpringState(); + otherConversationState.Id = "otherConversationState"; + // leave new + //try second by 'ParentConversation = ' + otherConversationState.ParentConversation = this.ConversationA; + this.Session["testResult"] = "OK"; + } + finally + { + otherConversationState.EndConversation(); + } + //END: NO Raise error + } + + private void startResumeConversationIsEnded() + { + Regex msgErrorRx = new Regex(".*StartResumeConversation.*conversation.*is.*ended.*"); + IConversationState otherConversationState = null; + //BEGIN: Raise error + try + { + otherConversationState = new WebConversationSpringState(); + otherConversationState.Id = "otherConversationState"; + // make not new + otherConversationState.EndConversation(); + otherConversationState.StartResumeConversation(); + throw new Exception("NOT OK: No raise for 'otherConversationState.StartResumeConversation()'"); + } + catch (InvalidOperationException ioe) + { + if (msgErrorRx.IsMatch(ioe.Message)) + { + this.Session["testResult"] = "OK"; + } + else + { + throw new Exception("NOT OK " + ioe.Message); + } + } + finally + { + otherConversationState.EndConversation(); + } + //END: Raise error + + //BEGIN: NO Raise error + try + { + otherConversationState = new WebConversationSpringState(); + otherConversationState.Id = "otherConversationState"; + // make not new + otherConversationState.StartResumeConversation(); + otherConversationState.EndConversation(); + this.Session["testResult"] = "OK"; + } + finally + { + otherConversationState.EndConversation(); + } + //END: NO Raise error + } + + private void participatingHibernateNotAlowed() + { + Regex msgErrorRx = new Regex(".*Participating.*Hibernate.*NOT.*ALLOWED.*"); + try + { + //No raise + this.ConversationA.StartResumeConversation(); + ISession session = this.SessionFactory.GetCurrentSession(); + this.ConversationManager.FreeEnded(); + this.ConversationManager.PauseConversations(); + this.Session["testResult"] = "OK"; + } + finally + { + this.ConversationManager.FreeEnded(); + this.ConversationManager.PauseConversations(); + } + + try + { + //Raise + this.ConversationA.StartResumeConversation(); + this.ConversationManager.FreeEnded(); + this.ConversationManager.PauseConversations(); + + SessionScopeSettings sessionScopeSettings = new SessionScopeSettings(this.sessionFactory); + sessionScopeSettings.SingleSession = true; + using (new SessionScope(sessionScopeSettings, true)) + { + ISession session = this.SessionFactory.GetCurrentSession(); + this.ConversationA.StartResumeConversation(); + } + throw new Exception("NOT OK: No raise for 'this.ConversationA.StartResumeConversation()'"); + } + catch (InvalidOperationException ioe) + { + if (msgErrorRx.IsMatch(ioe.Message)) + { + this.Session["testResult"] = "OK"; + } + else + { + throw new Exception("NOT OK " + ioe.Message); + } + } + finally + { + this.ConversationManager.FreeEnded(); + this.ConversationManager.PauseConversations(); + } + + } + + private void idIsDifferentFromSpringName() + { + Regex msgErrorRx = new Regex(".*Id.*is.*different.*from.*spring.*name.*"); + IConversationState otherConversationState = null; + //BEGIN: Raise error + try + { + otherConversationState = new WebConversationSpringState(); + otherConversationState.Id = "otherConversationState"; + // different name + ((IObjectNameAware)otherConversationState).ObjectName = "different_name"; + throw new Exception("NOT OK: No raise for '((IObjectNameAware)otherConversationState).ObjectName ='"); + } + catch (InvalidOperationException ioe) + { + if (msgErrorRx.IsMatch(ioe.Message)) + { + this.Session["testResult"] = "OK"; + } + else + { + throw new Exception("NOT OK " + ioe.Message); + } + } + finally + { + otherConversationState.EndConversation(); + } + //END: Raise error + + //BEGIN: NO Raise error + try + { + otherConversationState = new WebConversationSpringState(); + otherConversationState.Id = "otherConversationState"; + // make not new + // different name + ((IObjectNameAware)otherConversationState).ObjectName = "otherConversationState"; + this.Session["testResult"] = "OK"; + } + finally + { + otherConversationState.EndConversation(); + } + //END: NO Raise error + } } \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_Begin.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_Begin.aspx similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_Begin.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_Begin.aspx index e695ce08..01d8ddd1 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_Begin.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_Begin.aspx @@ -1,3 +1,3 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PatialEndConv_A_B_Begin.aspx.cs" Inherits="PatialEndConv_A_B_Begin" %><% -Response.Write("OK"); +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PatialEndConv_A_B_Begin.aspx.cs" Inherits="PatialEndConv_A_B_Begin" %><% +Response.Write("OK"); %> \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_Begin.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_Begin.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_Begin.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_Begin.aspx.cs index b25c2542..3f37dff6 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_Begin.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_Begin.aspx.cs @@ -1,15 +1,15 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; - -public partial class PatialEndConv_A_B_Begin : PatialEndConvBeginBasePage -{ -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; + +public partial class PatialEndConv_A_B_Begin : PatialEndConvBeginBasePage +{ +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_End.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_End.aspx similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_End.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_End.aspx index f9caee04..1b017af5 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_End.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_End.aspx @@ -1,3 +1,3 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PatialEndConv_A_B_End.aspx.cs" Inherits="PatialEndConv_A_B_End" %><% -Response.Write("OK"); +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PatialEndConv_A_B_End.aspx.cs" Inherits="PatialEndConv_A_B_End" %><% +Response.Write("OK"); %> \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_End.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_End.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_End.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_End.aspx.cs index b205b401..4a44c4c6 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_End.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_B_End.aspx.cs @@ -1,15 +1,15 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; - -public partial class PatialEndConv_A_B_End : PatialEndConvEndBasePage -{ -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; + +public partial class PatialEndConv_A_B_End : PatialEndConvEndBasePage +{ +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_Begin.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_Begin.aspx similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_Begin.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_Begin.aspx index 83bc8c8a..08e19b07 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_Begin.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_Begin.aspx @@ -1,3 +1,3 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PatialEndConv_A_Begin.aspx.cs" Inherits="PatialEndConv_A_Begin" %><% -Response.Write("OK"); +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PatialEndConv_A_Begin.aspx.cs" Inherits="PatialEndConv_A_Begin" %><% +Response.Write("OK"); %> \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_Begin.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_Begin.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_Begin.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_Begin.aspx.cs index 7a4a6699..d4fb8b8f 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_Begin.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_Begin.aspx.cs @@ -1,15 +1,15 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; - -public partial class PatialEndConv_A_Begin : PatialEndConvBeginBasePage -{ -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; + +public partial class PatialEndConv_A_Begin : PatialEndConvBeginBasePage +{ +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_End.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_End.aspx similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_End.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_End.aspx index dded3de4..1a85836f 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_End.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_End.aspx @@ -1,3 +1,3 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PatialEndConv_A_End.aspx.cs" Inherits="PatialEndConv_A_End" %><% -Response.Write("OK"); +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PatialEndConv_A_End.aspx.cs" Inherits="PatialEndConv_A_End" %><% +Response.Write("OK"); %> \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_End.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_End.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_End.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_End.aspx.cs index ab646490..b3a14a4a 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_End.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/PatialEndConv_A_End.aspx.cs @@ -1,15 +1,15 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; - -public partial class PatialEndConv_A_End : PatialEndConvEndBasePage -{ -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; + +public partial class PatialEndConv_A_End : PatialEndConvEndBasePage +{ +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/RedirectErrorNoPauseConversation.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/RedirectErrorNoPauseConversation.aspx similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/RedirectErrorNoPauseConversation.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/RedirectErrorNoPauseConversation.aspx index 523cf938..73beaf72 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/RedirectErrorNoPauseConversation.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/RedirectErrorNoPauseConversation.aspx @@ -1,3 +1,3 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RedirectErrorNoPauseConversation.aspx.cs" Inherits="RedirectErrorNoPauseConversation" %><% -Response.Write("OK"); +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RedirectErrorNoPauseConversation.aspx.cs" Inherits="RedirectErrorNoPauseConversation" %><% +Response.Write("OK"); %> \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/RedirectErrorNoPauseConversation.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/RedirectErrorNoPauseConversation.aspx.cs similarity index 97% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/RedirectErrorNoPauseConversation.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/RedirectErrorNoPauseConversation.aspx.cs index 6c1269bd..c75562b5 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/RedirectErrorNoPauseConversation.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/RedirectErrorNoPauseConversation.aspx.cs @@ -1,58 +1,58 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; -using Spring.Entities; -using System.Threading; -using NHibernate; - -public partial class RedirectErrorNoPauseConversation : System.Web.UI.Page -{ - private IConversationState conversation; - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - - protected void Page_Load(object sender, EventArgs e) - { - if (this.Request.Params["step"].Equals("obtain_session_cookie")) - { - //nothing, only for obtain session cookie - } - if (this.Request.Params["step"].Equals("step_01")) - { - this.Conversation.StartResumeConversation(); - //Open Session for the first time - ISession ss = this.Conversation.SessionFactory.GetCurrentSession(); - this.Response.Redirect("RedirectErrorNoPauseConversation.aspx?step=step_02"); - } - else if (this.Request.Params["step"].Equals("step_02")) - { - this.Conversation.StartResumeConversation(); - } - else if (this.Request.Params["step"].Equals("Some_Exception")) - { - this.Conversation.StartResumeConversation(); - //Open Session for the first time - ISession ss = this.Conversation.SessionFactory.GetCurrentSession(); - throw new Exception("Some_Exception"); - } - else if (this.Request.Params["step"].Equals("Post_Some_Exception")) - { - this.Conversation.StartResumeConversation(); - } - else if (this.Request.Params["step"].Equals("end_conversation")) - { - this.Conversation.EndConversation(); - } - } -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; +using Spring.Entities; +using System.Threading; +using NHibernate; + +public partial class RedirectErrorNoPauseConversation : System.Web.UI.Page +{ + private IConversationState conversation; + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + if (this.Request.Params["step"].Equals("obtain_session_cookie")) + { + //nothing, only for obtain session cookie + } + if (this.Request.Params["step"].Equals("step_01")) + { + this.Conversation.StartResumeConversation(); + //Open Session for the first time + ISession ss = this.Conversation.SessionFactory.GetCurrentSession(); + this.Response.Redirect("RedirectErrorNoPauseConversation.aspx?step=step_02"); + } + else if (this.Request.Params["step"].Equals("step_02")) + { + this.Conversation.StartResumeConversation(); + } + else if (this.Request.Params["step"].Equals("Some_Exception")) + { + this.Conversation.StartResumeConversation(); + //Open Session for the first time + ISession ss = this.Conversation.SessionFactory.GetCurrentSession(); + throw new Exception("Some_Exception"); + } + else if (this.Request.Params["step"].Equals("Post_Some_Exception")) + { + this.Conversation.StartResumeConversation(); + } + else if (this.Request.Params["step"].Equals("end_conversation")) + { + this.Conversation.EndConversation(); + } + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Begin.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Begin.aspx similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Begin.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Begin.aspx index ebbcf51f..9d89725e 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Begin.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Begin.aspx @@ -1,3 +1,3 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SPCLazyLoadTest_A_Begin.aspx.cs" Inherits="SPCLazyLoadTest_A_Begin" %><% -Response.Write("OK"); +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SPCLazyLoadTest_A_Begin.aspx.cs" Inherits="SPCLazyLoadTest_A_Begin" %><% +Response.Write("OK"); %> \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Begin.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Begin.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Begin.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Begin.aspx.cs index 9a327f53..6322c478 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Begin.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Begin.aspx.cs @@ -1,45 +1,45 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; -using NHibernate; -using Spring.Entities; - -public partial class SPCLazyLoadTest_A_Begin : System.Web.UI.Page -{ - private IConversationState conversation; - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - private ISessionFactory sessionFactory; - public ISessionFactory SessionFactory - { - get { return sessionFactory; } - set { sessionFactory = value; } - } - protected void Page_Load(object sender, EventArgs e) - { - if (this.Request["endConversation"] != null && bool.Parse(this.Request["endConversation"])) - { - this.Conversation.EndConversation(); - } - else - { - this.Conversation.StartResumeConversation(); - - ISession session = this.SessionFactory.GetCurrentSession(); - - SPCMasterEnt sPCMasterEnt = session.Get(1); - this.Session["sPCMasterEnt"] = sPCMasterEnt; - } - } -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; +using NHibernate; +using Spring.Entities; + +public partial class SPCLazyLoadTest_A_Begin : System.Web.UI.Page +{ + private IConversationState conversation; + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + private ISessionFactory sessionFactory; + public ISessionFactory SessionFactory + { + get { return sessionFactory; } + set { sessionFactory = value; } + } + protected void Page_Load(object sender, EventArgs e) + { + if (this.Request["endConversation"] != null && bool.Parse(this.Request["endConversation"])) + { + this.Conversation.EndConversation(); + } + else + { + this.Conversation.StartResumeConversation(); + + ISession session = this.SessionFactory.GetCurrentSession(); + + SPCMasterEnt sPCMasterEnt = session.Get(1); + this.Session["sPCMasterEnt"] = sPCMasterEnt; + } + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Status.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Status.aspx similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Status.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Status.aspx index 867ef918..8f1e9f95 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Status.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Status.aspx @@ -1,3 +1,3 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SPCLazyLoadTest_A_Status.aspx.cs" Inherits="SPCLazyLoadTest_A_Status" %><% -Response.Write("OK"); +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SPCLazyLoadTest_A_Status.aspx.cs" Inherits="SPCLazyLoadTest_A_Status" %><% +Response.Write("OK"); %> \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Status.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Status.aspx.cs similarity index 97% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Status.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Status.aspx.cs index 46809c42..a71b4809 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Status.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCLazyLoadTest_A_Status.aspx.cs @@ -1,48 +1,48 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; -using Spring.Entities; -using Common.Logging; -using NHibernate; - -public partial class SPCLazyLoadTest_A_Status : System.Web.UI.Page -{ - private static readonly ILog LOG = LogManager.GetLogger(typeof(SPCLazyLoadTest_A_Status)); - - private IConversationState conversation; - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - protected void Page_Load(object sender, EventArgs e) - { - try - { - this.Conversation.StartResumeConversation(); - - SPCMasterEnt sPCMasterEnt = (SPCMasterEnt)this.Session["sPCMasterEnt"]; - foreach (SPCDetailEnt sPCDetailEntItem in sPCMasterEnt.SPCDetailEntList) - { - LOG.Debug(String.Format("Page_Load: sPCDetailEntItem.Description={0}", sPCDetailEntItem.Description)); - } - this.Session["messageTest"] = "no lazy error"; - } - catch (LazyInitializationException lex) - { - this.Session["messageTest"] = lex.GetType().FullName + ": " + lex.Message + "\n" + lex.StackTrace; - } - catch (Exception ex) - { - this.Session["messageTest"] = ex.GetType().FullName + ": " + ex.Message + "\n" + ex.StackTrace; - } - } -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; +using Spring.Entities; +using Common.Logging; +using NHibernate; + +public partial class SPCLazyLoadTest_A_Status : System.Web.UI.Page +{ + private static readonly ILog LOG = LogManager.GetLogger(typeof(SPCLazyLoadTest_A_Status)); + + private IConversationState conversation; + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + protected void Page_Load(object sender, EventArgs e) + { + try + { + this.Conversation.StartResumeConversation(); + + SPCMasterEnt sPCMasterEnt = (SPCMasterEnt)this.Session["sPCMasterEnt"]; + foreach (SPCDetailEnt sPCDetailEntItem in sPCMasterEnt.SPCDetailEntList) + { + LOG.Debug(String.Format("Page_Load: sPCDetailEntItem.Description={0}", sPCDetailEntItem.Description)); + } + this.Session["messageTest"] = "no lazy error"; + } + catch (LazyInitializationException lex) + { + this.Session["messageTest"] = lex.GetType().FullName + ": " + lex.Message + "\n" + lex.StackTrace; + } + catch (Exception ex) + { + this.Session["messageTest"] = ex.GetType().FullName + ": " + ex.Message + "\n" + ex.StackTrace; + } + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCSwitchConversationSameRequest.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCSwitchConversationSameRequest.aspx similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCSwitchConversationSameRequest.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCSwitchConversationSameRequest.aspx index 324bf809..d848cae5 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCSwitchConversationSameRequest.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCSwitchConversationSameRequest.aspx @@ -1,3 +1,3 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SPCSwitchConversationSameRequest.aspx.cs" Inherits="SPCSwitchConversationSameRequest" %><% -Response.Write("OK"); +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SPCSwitchConversationSameRequest.aspx.cs" Inherits="SPCSwitchConversationSameRequest" %><% +Response.Write("OK"); %> \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCSwitchConversationSameRequest.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCSwitchConversationSameRequest.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCSwitchConversationSameRequest.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCSwitchConversationSameRequest.aspx.cs index 70b6434d..cba1168d 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCSwitchConversationSameRequest.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SPCSwitchConversationSameRequest.aspx.cs @@ -1,112 +1,112 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; -using Spring.Entities; -using NHibernate; -using Common.Logging; - -public partial class SPCSwitchConversationSameRequest : System.Web.UI.Page -{ - private static readonly ILog LOG = LogManager.GetLogger(typeof(SPCSwitchConversationSameRequest)); - - private IConversationState conversationA; - public IConversationState ConversationA - { - get { return conversationA; } - set { conversationA = value; } - } - private IConversationState conversationB; - public IConversationState ConversationB - { - get { return conversationB; } - set { conversationB = value; } - } - - private ISessionFactory sessionFactory; - public ISessionFactory SessionFactory - { - get { return sessionFactory; } - set { sessionFactory = value; } - } - - protected void Page_Load(object sender, EventArgs e) - { - this.ConversationA.StartResumeConversation(); - SPCMasterEnt sPCMasterEntA = this.SessionFactory.GetCurrentSession().Get(1); - - this.ConversationB.StartResumeConversation(); - SPCMasterEnt sPCMasterEntB = this.SessionFactory.GetCurrentSession().Get(1); - - //testeRaizeLazy_A - try - { - this.LoopSPCMasterEnt(sPCMasterEntA, "sPCMasterEntA"); - } - catch (LazyInitializationException) - { - this.Session["testeRaizeLazy_A"] = "OK"; - } - catch (Exception ex) - { - this.Session["testeRaizeLazy_A"] = ex.ToString(); - } - - //testeRaizeLazy_B - this.ConversationA.StartResumeConversation(); - try - { - this.LoopSPCMasterEnt(sPCMasterEntB, "sPCMasterEntB"); - } - catch (LazyInitializationException) - { - this.Session["testeRaizeLazy_B"] = "OK"; - } - catch (Exception ex) - { - this.Session["testeRaizeLazy_B"] = ex.ToString(); - } - - //testeNoRaizeLazy_A - this.ConversationA.StartResumeConversation(); - try - { - this.LoopSPCMasterEnt(sPCMasterEntA, "sPCMasterEntA"); - this.Session["testeNoRaizeLazy_A"] = "OK"; - } - catch (Exception ex) - { - this.Session["testeNoRaizeLazy_A"] = ex.ToString(); - } - - //testeNoRaizeLazy_B - this.ConversationB.StartResumeConversation(); - try - { - this.LoopSPCMasterEnt(sPCMasterEntB, "sPCMasterEntB"); - this.Session["testeNoRaizeLazy_B"] = "OK"; - } - catch (Exception ex) - { - this.Session["testeNoRaizeLazy_B"] = ex.ToString(); - } - - this.ConversationA.EndConversation(); - this.ConversationB.EndConversation(); - } - - private void LoopSPCMasterEnt(SPCMasterEnt sPCMasterEnt, String desc) - { - foreach (SPCDetailEnt sPCDetailEntItem in sPCMasterEnt.SPCDetailEntList) - { - LOG.Debug(String.Format("Page_Load({1}): sPCDetailEntItem.Description={0}", sPCDetailEntItem.Description, desc)); - } - } -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; +using Spring.Entities; +using NHibernate; +using Common.Logging; + +public partial class SPCSwitchConversationSameRequest : System.Web.UI.Page +{ + private static readonly ILog LOG = LogManager.GetLogger(typeof(SPCSwitchConversationSameRequest)); + + private IConversationState conversationA; + public IConversationState ConversationA + { + get { return conversationA; } + set { conversationA = value; } + } + private IConversationState conversationB; + public IConversationState ConversationB + { + get { return conversationB; } + set { conversationB = value; } + } + + private ISessionFactory sessionFactory; + public ISessionFactory SessionFactory + { + get { return sessionFactory; } + set { sessionFactory = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + this.ConversationA.StartResumeConversation(); + SPCMasterEnt sPCMasterEntA = this.SessionFactory.GetCurrentSession().Get(1); + + this.ConversationB.StartResumeConversation(); + SPCMasterEnt sPCMasterEntB = this.SessionFactory.GetCurrentSession().Get(1); + + //testeRaizeLazy_A + try + { + this.LoopSPCMasterEnt(sPCMasterEntA, "sPCMasterEntA"); + } + catch (LazyInitializationException) + { + this.Session["testeRaizeLazy_A"] = "OK"; + } + catch (Exception ex) + { + this.Session["testeRaizeLazy_A"] = ex.ToString(); + } + + //testeRaizeLazy_B + this.ConversationA.StartResumeConversation(); + try + { + this.LoopSPCMasterEnt(sPCMasterEntB, "sPCMasterEntB"); + } + catch (LazyInitializationException) + { + this.Session["testeRaizeLazy_B"] = "OK"; + } + catch (Exception ex) + { + this.Session["testeRaizeLazy_B"] = ex.ToString(); + } + + //testeNoRaizeLazy_A + this.ConversationA.StartResumeConversation(); + try + { + this.LoopSPCMasterEnt(sPCMasterEntA, "sPCMasterEntA"); + this.Session["testeNoRaizeLazy_A"] = "OK"; + } + catch (Exception ex) + { + this.Session["testeNoRaizeLazy_A"] = ex.ToString(); + } + + //testeNoRaizeLazy_B + this.ConversationB.StartResumeConversation(); + try + { + this.LoopSPCMasterEnt(sPCMasterEntB, "sPCMasterEntB"); + this.Session["testeNoRaizeLazy_B"] = "OK"; + } + catch (Exception ex) + { + this.Session["testeNoRaizeLazy_B"] = ex.ToString(); + } + + this.ConversationA.EndConversation(); + this.ConversationB.EndConversation(); + } + + private void LoopSPCMasterEnt(SPCMasterEnt sPCMasterEnt, String desc) + { + foreach (SPCDetailEnt sPCDetailEntItem in sPCMasterEnt.SPCDetailEntList) + { + LOG.Debug(String.Format("Page_Load({1}): sPCDetailEntItem.Description={0}", sPCDetailEntItem.Description, desc)); + } + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SerializeConversationTest.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SerializeConversationTest.aspx similarity index 100% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SerializeConversationTest.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SerializeConversationTest.aspx diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SerializeConversationTest.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SerializeConversationTest.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SerializeConversationTest.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SerializeConversationTest.aspx.cs index 60e92369..e8bcc30e 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SerializeConversationTest.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SerializeConversationTest.aspx.cs @@ -1,84 +1,84 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; -using Spring.Data.NHibernate.Support; -using NHibernate; -using Spring.Entities; -using Spring.Spring.Data.Common; -using NUnit.Framework; -using Spring.Bsn; -using NHibernate.Impl; -using System.Reflection; -using NHibernate.Cfg; -using Spring.Context; -using System.Collections.Generic; -using System.Runtime.Serialization.Formatters.Binary; -using System.IO; - -/// -/// Page for . -/// -public partial class SerializeConversationTest : System.Web.UI.Page -{ - private IConversationState conversation; - /// - /// - /// - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - - protected void Page_Load(object sender, EventArgs e) - { - try - { - this.Conversation.StartResumeConversation(); - ISession ss = this.Conversation.SessionFactory.GetCurrentSession(); - IList deatilList = ss.CreateCriteria().List(); - - this.Conversation.ConversationManager.PauseConversations(); - - BinaryFormatter bf = new BinaryFormatter(); - MemoryStream ms = new MemoryStream(); - - System.Collections.ArrayList sessionContent = new System.Collections.ArrayList(); - foreach (String keyItem in this.Session.Keys) - { - sessionContent.Add(this.Session[keyItem]); - } - - bf.Serialize(ms, sessionContent); - - - if (this.Session["SPCDetailEnt#1"] == null) - { - //at the first time - this.Session["SPCDetailEnt#1"] = ss.Get(1); - } - else - { - //at the second time - if (!Object.ReferenceEquals(this.Session["SPCDetailEnt#1"], ss.Get(1))) - throw new InvalidOperationException("!Object.ReferenceEquals(this.Session['SPCDetailEnt#1'], ss.Get(1))"); - } - - Response.Clear(); - Response.Write("OK"); - } - catch (Exception ex) - { - Response.Clear(); - Response.Write(ex.Message + " " + ex.StackTrace); - } - } -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; +using Spring.Data.NHibernate.Support; +using NHibernate; +using Spring.Entities; +using Spring.Spring.Data.Common; +using NUnit.Framework; +using Spring.Bsn; +using NHibernate.Impl; +using System.Reflection; +using NHibernate.Cfg; +using Spring.Context; +using System.Collections.Generic; +using System.Runtime.Serialization.Formatters.Binary; +using System.IO; + +/// +/// Page for . +/// +public partial class SerializeConversationTest : System.Web.UI.Page +{ + private IConversationState conversation; + /// + /// + /// + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + try + { + this.Conversation.StartResumeConversation(); + ISession ss = this.Conversation.SessionFactory.GetCurrentSession(); + IList deatilList = ss.CreateCriteria().List(); + + this.Conversation.ConversationManager.PauseConversations(); + + BinaryFormatter bf = new BinaryFormatter(); + MemoryStream ms = new MemoryStream(); + + System.Collections.ArrayList sessionContent = new System.Collections.ArrayList(); + foreach (String keyItem in this.Session.Keys) + { + sessionContent.Add(this.Session[keyItem]); + } + + bf.Serialize(ms, sessionContent); + + + if (this.Session["SPCDetailEnt#1"] == null) + { + //at the first time + this.Session["SPCDetailEnt#1"] = ss.Get(1); + } + else + { + //at the second time + if (!Object.ReferenceEquals(this.Session["SPCDetailEnt#1"], ss.Get(1))) + throw new InvalidOperationException("!Object.ReferenceEquals(this.Session['SPCDetailEnt#1'], ss.Get(1))"); + } + + Response.Clear(); + Response.Write("OK"); + } + catch (Exception ex) + { + Response.Clear(); + Response.Write(ex.Message + " " + ex.StackTrace); + } + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedA.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedA.aspx similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedA.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedA.aspx index fc10bf12..931a573a 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedA.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedA.aspx @@ -1,16 +1,16 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SessionIsClosedA.aspx.cs" Inherits="SessionIsClosedA" %> - - - - - - Untitled Page - - -
-
- -
-
- - +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SessionIsClosedA.aspx.cs" Inherits="SessionIsClosedA" %> + + + + + + Untitled Page + + +
+
+ +
+
+ + diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedA.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedA.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedA.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedA.aspx.cs index c0ea808d..e3a2034c 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedA.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedA.aspx.cs @@ -1,46 +1,46 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; -using Spring.Entities; -using NHibernate; - -public partial class SessionIsClosedA : System.Web.UI.Page -{ - private IConversationState conversation; - /// - /// - /// - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - - protected void Page_Load(object sender, EventArgs e) - { - this.Session["result"] = "NOT OK"; - - try - { - this.Conversation.StartResumeConversation(); - - //database access - ISession session = this.Conversation.SessionFactory.GetCurrentSession(); - SPCMasterEnt sPCMasterEnt = session.Get(1); - - this.Session["result"] = "OK"; - } - catch (Exception ex) - { - this.Session["result"] = ex.Message; - } - } -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; +using Spring.Entities; +using NHibernate; + +public partial class SessionIsClosedA : System.Web.UI.Page +{ + private IConversationState conversation; + /// + /// + /// + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + this.Session["result"] = "NOT OK"; + + try + { + this.Conversation.StartResumeConversation(); + + //database access + ISession session = this.Conversation.SessionFactory.GetCurrentSession(); + SPCMasterEnt sPCMasterEnt = session.Get(1); + + this.Session["result"] = "OK"; + } + catch (Exception ex) + { + this.Session["result"] = ex.Message; + } + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedB.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedB.aspx similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedB.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedB.aspx index 0571bfd2..bcdfc51c 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedB.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedB.aspx @@ -1,16 +1,16 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SessionIsClosedB.aspx.cs" Inherits="SessionIsClosedB" %> - - - - - - Untitled Page - - -
-
- -
-
- - +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SessionIsClosedB.aspx.cs" Inherits="SessionIsClosedB" %> + + + + + + Untitled Page + + +
+
+ +
+
+ + diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedB.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedB.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedB.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedB.aspx.cs index 920b98a7..29e9c77c 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedB.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/SessionIsClosedB.aspx.cs @@ -1,71 +1,71 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; -using Spring.Entities; -using NHibernate; - -public partial class SessionIsClosedB : System.Web.UI.Page -{ - private IConversationState conversation; - /// - /// - /// - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - - private IConversationState conversationA; - /// - /// "convASessionIsClosed" - /// - public IConversationState ConversationA - { - get { return conversationA; } - set { conversationA = value; } - } - - protected void Page_Load(object sender, EventArgs e) - { - this.Session["result"] = "NOT OK"; - - try - { - if ("endA_FreeEnded".Equals(this.Request["command"])) - { - this.Conversation.StartResumeConversation(); - - /* - * Producing the error "HibernateException: Session is closed..." This is because in - * "SessionPerConversationScope.LazySessionPerConversationHolder.CloseConversation(IConversationState)" - * we are closing the "SessionPerConversationScope.LazySessionPerConversationHolder.activeConversation" - * instead of parameter "conversation" (BUG). - */ - this.ConversationA.EndConversation(); - this.ConversationA.ConversationManager.FreeEnded(); - this.Conversation.ConversationManager.PauseConversations(); - } - - this.Conversation.StartResumeConversation(); - - //database access - ISession session = this.Conversation.SessionFactory.GetCurrentSession(); - SPCMasterEnt sPCMasterEnt = session.Get(1); - - this.Session["result"] = "OK"; - } - catch (Exception ex) - { - this.Session["result"] = ex.Message; - } - } -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; +using Spring.Entities; +using NHibernate; + +public partial class SessionIsClosedB : System.Web.UI.Page +{ + private IConversationState conversation; + /// + /// + /// + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + + private IConversationState conversationA; + /// + /// "convASessionIsClosed" + /// + public IConversationState ConversationA + { + get { return conversationA; } + set { conversationA = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + this.Session["result"] = "NOT OK"; + + try + { + if ("endA_FreeEnded".Equals(this.Request["command"])) + { + this.Conversation.StartResumeConversation(); + + /* + * Producing the error "HibernateException: Session is closed..." This is because in + * "SessionPerConversationScope.LazySessionPerConversationHolder.CloseConversation(IConversationState)" + * we are closing the "SessionPerConversationScope.LazySessionPerConversationHolder.activeConversation" + * instead of parameter "conversation" (BUG). + */ + this.ConversationA.EndConversation(); + this.ConversationA.ConversationManager.FreeEnded(); + this.Conversation.ConversationManager.PauseConversations(); + } + + this.Conversation.StartResumeConversation(); + + //database access + ISession session = this.Conversation.SessionFactory.GetCurrentSession(); + SPCMasterEnt sPCMasterEnt = session.Get(1); + + this.Session["result"] = "OK"; + } + catch (Exception ex) + { + this.Session["result"] = ex.Message; + } + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_NoTimeOut.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_NoTimeOut.aspx similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_NoTimeOut.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_NoTimeOut.aspx index 1a3eda9a..34b064c2 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_NoTimeOut.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_NoTimeOut.aspx @@ -1,3 +1,3 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TimeOut_NoTimeOut.aspx.cs" Inherits="TimeOut_NoTimeOut" %><% -Response.Write("OK"); +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TimeOut_NoTimeOut.aspx.cs" Inherits="TimeOut_NoTimeOut" %><% +Response.Write("OK"); %> \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_NoTimeOut.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_NoTimeOut.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_NoTimeOut.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_NoTimeOut.aspx.cs index c258f3ee..c3df4bcc 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_NoTimeOut.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_NoTimeOut.aspx.cs @@ -1,32 +1,32 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; - -public partial class TimeOut_NoTimeOut : System.Web.UI.Page -{ - private IConversationState conversation; - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - protected void Page_Load(object sender, EventArgs e) - { - this.Conversation.StartResumeConversation(); - - this.Session["keyTimeOut_Old"] = Conversation["keyTimeOut"]; - Conversation["keyTimeOut"] = "this is the new value"; - this.Session["keyTimeOut_New"] = Conversation["keyTimeOut"]; - - //This should not cause the end of the conversation by timeout - this.Conversation.LastAccess = DateTime.Now.AddMilliseconds(-(this.Conversation.TimeOut / 2)); - } -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; + +public partial class TimeOut_NoTimeOut : System.Web.UI.Page +{ + private IConversationState conversation; + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + protected void Page_Load(object sender, EventArgs e) + { + this.Conversation.StartResumeConversation(); + + this.Session["keyTimeOut_Old"] = Conversation["keyTimeOut"]; + Conversation["keyTimeOut"] = "this is the new value"; + this.Session["keyTimeOut_New"] = Conversation["keyTimeOut"]; + + //This should not cause the end of the conversation by timeout + this.Conversation.LastAccess = DateTime.Now.AddMilliseconds(-(this.Conversation.TimeOut / 2)); + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_WithTimeOut.aspx b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_WithTimeOut.aspx similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_WithTimeOut.aspx rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_WithTimeOut.aspx index 2ca44957..dc7d4b69 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_WithTimeOut.aspx +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_WithTimeOut.aspx @@ -1,3 +1,3 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TimeOut_WithTimeOut.aspx.cs" Inherits="TimeOut_WithTimeOut" %><% -Response.Write("OK"); +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TimeOut_WithTimeOut.aspx.cs" Inherits="TimeOut_WithTimeOut" %><% +Response.Write("OK"); %> \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_WithTimeOut.aspx.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_WithTimeOut.aspx.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_WithTimeOut.aspx.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_WithTimeOut.aspx.cs index 2ea5175a..fd5b7948 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_WithTimeOut.aspx.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/TimeOut_WithTimeOut.aspx.cs @@ -1,27 +1,27 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using Spring.ConversationWA; - -public partial class TimeOut_WithTimeOut : System.Web.UI.Page -{ - private IConversationState conversation; - public IConversationState Conversation - { - get { return conversation; } - set { conversation = value; } - } - - protected void Page_Load(object sender, EventArgs e) - { - //This should cause the end of the conversation by timeout - this.Conversation.LastAccess = DateTime.Now.AddMilliseconds(-(this.Conversation.TimeOut * 2)); - } -} +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using Spring.ConversationWA; + +public partial class TimeOut_WithTimeOut : System.Web.UI.Page +{ + private IConversationState conversation; + public IConversationState Conversation + { + get { return conversation; } + set { conversation = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + //This should cause the end of the conversation by timeout + this.Conversation.LastAccess = DateTime.Now.AddMilliseconds(-(this.Conversation.TimeOut * 2)); + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/Web.Config b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/Web.Config similarity index 97% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/Web.Config rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/Web.Config index e9405818..44777214 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/Web.Config +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/Web.Config @@ -1,99 +1,99 @@ - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/log4net.config b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/log4net.config similarity index 97% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/log4net.config rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/log4net.config index 5a27fc7b..f1b8bbb6 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/log4net.config +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/log4net.config @@ -1,67 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/services.xml.config b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/services.xml.config similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/services.xml.config rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/services.xml.config index 8074dc43..a50810ec 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/services.xml.config +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/services.xml.config @@ -1,353 +1,353 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - conversationManager - conversationManagerEndPaused - convMngEndPausedSessionIsClosed - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Spring.ConversationWA.NH32.Tests - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + conversationManager + conversationManagerEndPaused + convMngEndPausedSessionIsClosed + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Spring.ConversationWA.NH32.Tests + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/sqlite/conversationTests.db b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/sqlite/conversationTests.db similarity index 100% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/sqlite/conversationTests.db rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/sqlite/conversationTests.db diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/web.config.net-2.0 b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/web.config.net-2.0 similarity index 97% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/web.config.net-2.0 rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/web.config.net-2.0 index d311c5de..24a2af99 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/web.config.net-2.0 +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Data/Spring/ConversationWA/WebConversationStateTest/web.config.net-2.0 @@ -1,99 +1,99 @@ - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Entities/SPCDetailEnt.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Entities/SPCDetailEnt.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Entities/SPCDetailEnt.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Entities/SPCDetailEnt.cs index 11a68687..0d8c16cf 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Entities/SPCDetailEnt.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Entities/SPCDetailEnt.cs @@ -1,57 +1,57 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Collections.Generic; -using System.Text; -using Spring.ConversationWA; - -namespace Spring.Entities -{ - /// - /// Detail Entity for 'session-per-conversation' tests: - /// , - /// - /// - /// Hailton de Castro - [Serializable] - public class SPCDetailEnt - { - private Int32? id; - /// - /// Entity key - /// - public virtual Int32? Id - { - get { return id; } - set { id = value; } - } - - private String description; - /// - /// Description - /// - public virtual String Description - { - get { return description; } - set { description = value; } - } - } -} +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; +using Spring.ConversationWA; + +namespace Spring.Entities +{ + /// + /// Detail Entity for 'session-per-conversation' tests: + /// , + /// + /// + /// Hailton de Castro + [Serializable] + public class SPCDetailEnt + { + private Int32? id; + /// + /// Entity key + /// + public virtual Int32? Id + { + get { return id; } + set { id = value; } + } + + private String description; + /// + /// Description + /// + public virtual String Description + { + get { return description; } + set { description = value; } + } + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Entities/SPCDetailEnt.hbm.xml b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Entities/SPCDetailEnt.hbm.xml similarity index 97% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Entities/SPCDetailEnt.hbm.xml rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Entities/SPCDetailEnt.hbm.xml index fd065967..6c23b07d 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Entities/SPCDetailEnt.hbm.xml +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Entities/SPCDetailEnt.hbm.xml @@ -1,9 +1,9 @@ - - - - - - - - - + + + + + + + + + diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Entities/SPCMasterEnt.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Entities/SPCMasterEnt.cs similarity index 96% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Entities/SPCMasterEnt.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Entities/SPCMasterEnt.cs index 5a04a63b..988d42f1 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Entities/SPCMasterEnt.cs +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Entities/SPCMasterEnt.cs @@ -1,67 +1,67 @@ -#region License - -/* - * Copyright © 2002-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Collections.Generic; -using System.Text; -using Spring.ConversationWA; - -namespace Spring.Entities -{ - /// - /// Master Entity for 'session-per-conversation' tests: - /// , - /// - /// - /// Hailton de Castro - [Serializable] - public class SPCMasterEnt - { - private Int32? id; - /// - /// Entity key - /// - public virtual Int32? Id - { - get { return id; } - set { id = value; } - } - - private String description; - /// - /// Description - /// - public virtual String Description - { - get { return description; } - set { description = value; } - } - - private IList sPCDetailEntList; - /// - /// one-to-many relationship. - /// - public virtual IList SPCDetailEntList - { - get { return sPCDetailEntList; } - set { sPCDetailEntList = value; } - } - } -} +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; +using Spring.ConversationWA; + +namespace Spring.Entities +{ + /// + /// Master Entity for 'session-per-conversation' tests: + /// , + /// + /// + /// Hailton de Castro + [Serializable] + public class SPCMasterEnt + { + private Int32? id; + /// + /// Entity key + /// + public virtual Int32? Id + { + get { return id; } + set { id = value; } + } + + private String description; + /// + /// Description + /// + public virtual String Description + { + get { return description; } + set { description = value; } + } + + private IList sPCDetailEntList; + /// + /// one-to-many relationship. + /// + public virtual IList SPCDetailEntList + { + get { return sPCDetailEntList; } + set { sPCDetailEntList = value; } + } + } +} diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Entities/SPCMasterEnt.hbm.xml b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Entities/SPCMasterEnt.hbm.xml similarity index 97% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Entities/SPCMasterEnt.hbm.xml rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Entities/SPCMasterEnt.hbm.xml index 80418909..27839cf1 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Entities/SPCMasterEnt.hbm.xml +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Entities/SPCMasterEnt.hbm.xml @@ -1,13 +1,13 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Spring.ConversationWA.NH32.Tests.2008.csproj b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Spring.ConversationWA.NH32.Tests.2008.csproj similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Spring.ConversationWA.NH32.Tests.2008.csproj rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Spring.ConversationWA.NH32.Tests.2008.csproj index a75c19f6..518927bc 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Spring.ConversationWA.NH32.Tests.2008.csproj +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Spring.ConversationWA.NH32.Tests.2008.csproj @@ -1,149 +1,149 @@ - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {2FB16852-22AD-4A5B-885A-97136265CC46} - Library - Properties - Spring - Spring.ConversationWA.NH32.Tests - - - 2.0 - v3.5 - - - - - - - true - full - false - ..\..\..\build\VS.Net.2008\Spring.ConversationWA.NH32.Tests\Debug\ - DEBUG;TRACE - prompt - 4 - ..\..\..\build\VS.Net.2008\Spring.ConversationWA.NH32.Tests\Debug\Spring.ConversationWA.NH32.Tests.XML - Program - $(MSBuildProjectDirectory)\..\..\dependencies\tools\NUnit-2.6.0.12051\bin\nunit-x86.exe - "$(MSBuildProjectDirectory)\$(OutputPath)\$(AssemblyName).dll" - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\Net\2.0\Common.Logging.dll - - - False - ..\..\..\lib\NHibernate32\net\3.5\NHibernate.dll - - - False - ..\..\..\lib\Net\2.0\nunit.framework.dll - - - False - ..\..\..\lib\Net\2.0\NUnitAspEx.dll - - - - 3.5 - - - - False - lib\net\2.0\System.Data.SQLite.dll - - - - - - - CommonAssemblyInfo.cs - - - - - - - ASPXCodeBehind - - - ASPXCodeBehind - - - - - - - - - - - {3A3A4E65-45A6-4B20-B460-0BEDC302C02C} - Spring.Aop.2008 - - - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87} - Spring.ConversationWA.NH32.2008 - - - {710961A3-0DF4-49E4-A26E-F5B9C044AC84} - Spring.Core.2008 - - - {1C8E0481-A70D-445E-AB4D-4A963CF7DC83} - Spring.Data.NHibernate32.2008 - - - {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} - Spring.Data.2008 - - - {BA4789EB-281A-48EA-8763-28B9F0596A18} - Spring.Web.2008 - - - - - - - - - - - - - - - - - - - - - - echo "Copying TestWebs to output directory" -rd /S /Q "$(TargetDir)Data" -xcopy "$(ProjectDir)Data" "$(TargetDir)Data\" /y /s -rd /S /Q "$(TargetDir)Data\Spring\ConversationWA\WebConversationStateTest\Bin" - - + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {2FB16852-22AD-4A5B-885A-97136265CC46} + Library + Properties + Spring + Spring.ConversationWA.NH32.Tests + + + 2.0 + v3.5 + + + + + + + true + full + false + ..\..\..\build\VS.Net.2008\Spring.ConversationWA.NH32.Tests\Debug\ + DEBUG;TRACE + prompt + 4 + ..\..\..\build\VS.Net.2008\Spring.ConversationWA.NH32.Tests\Debug\Spring.ConversationWA.NH32.Tests.XML + Program + $(MSBuildProjectDirectory)\..\..\dependencies\tools\NUnit-2.6.0.12051\bin\nunit-x86.exe + "$(MSBuildProjectDirectory)\$(OutputPath)\$(AssemblyName).dll" + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\Net\2.0\Common.Logging.dll + + + False + ..\..\..\lib\NHibernate32\net\3.5\NHibernate.dll + + + False + ..\..\..\lib\Net\2.0\nunit.framework.dll + + + False + ..\..\..\lib\Net\2.0\NUnitAspEx.dll + + + + 3.5 + + + + False + lib\net\2.0\System.Data.SQLite.dll + + + + + + + CommonAssemblyInfo.cs + + + + + + + ASPXCodeBehind + + + ASPXCodeBehind + + + + + + + + + + + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C} + Spring.Aop.2008 + + + {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87} + Spring.ConversationWA.NH32.2008 + + + {710961A3-0DF4-49E4-A26E-F5B9C044AC84} + Spring.Core.2008 + + + {1C8E0481-A70D-445E-AB4D-4A963CF7DC83} + Spring.Data.NHibernate32.2008 + + + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} + Spring.Data.2008 + + + {BA4789EB-281A-48EA-8763-28B9F0596A18} + Spring.Web.2008 + + + + + + + + + + + + + + + + + + + + + + echo "Copying TestWebs to output directory" +rd /S /Q "$(TargetDir)Data" +xcopy "$(ProjectDir)Data" "$(TargetDir)Data\" /y /s +rd /S /Q "$(TargetDir)Data\Spring\ConversationWA\WebConversationStateTest\Bin" + + \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Spring.ConversationWA.NH32.Tests.2010.csproj b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Spring.ConversationWA.NH32.Tests.2010.csproj similarity index 98% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Spring.ConversationWA.NH32.Tests.2010.csproj rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Spring.ConversationWA.NH32.Tests.2010.csproj index dfa20515..8f0ea12c 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Spring.ConversationWA.NH32.Tests.2010.csproj +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Spring.ConversationWA.NH32.Tests.2010.csproj @@ -1,299 +1,299 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {2FB16852-22AD-4A5B-885A-97136265CC46} - Library - Properties - Spring - Spring.ConversationWA.NH32.Tests - - - 3.5 - v4.0 - - - http://localhost/Spring.ConversationWA.NH32.Tests/ - true - Web - true - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - true - false - true - - - true - full - false - ..\..\..\build\VS.Net.2010\Spring.ConversationWA.NH32.Tests\Debug\ - DEBUG;TRACE - prompt - 4 - ..\..\..\build\VS.Net.2010\Spring.ConversationWA.NH32.Tests\Debug\Spring.ConversationWA.NH32.Tests.XML - Program - $(MSBuildProjectDirectory)\..\..\dependencies\tools\NUnit-2.6.0.12051\bin\nunit-x86.exe - "$(MSBuildProjectDirectory)\$(OutputPath)\$(AssemblyName).dll" - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\Net\2.0\Common.Logging.dll - - - False - ..\..\..\lib\NHibernate32\net\3.5\NHibernate.dll - - - False - ..\..\..\lib\Net\2.0\nunit.framework.dll - - - False - ..\..\..\lib\Net\2.0\NUnitAspEx.dll - - - - 3.5 - - - - False - lib\net\2.0\System.Data.SQLite.dll - - - - - - - CommonAssemblyInfo.cs - - - - - - - ASPXCodeBehind - - - ASPXCodeBehind - - - - - - CircularDependenceTest.aspx - ASPXCodeBehind - - - ConnectionReleaseModeIssue.aspx - ASPXCodeBehind - - - EndConversationTestBegin.aspx - ASPXCodeBehind - - - EndConversationTestEnd.aspx - ASPXCodeBehind - - - EndPausedSessionIsClosedA.aspx - ASPXCodeBehind - - - EndPausedSessionIsClosedB.aspx - ASPXCodeBehind - - - EndPausedTest.aspx - ASPXCodeBehind - - - GetParentObjetFromChild.aspx - ASPXCodeBehind - - - IoeTests.aspx - ASPXCodeBehind - - - PatialEndConv_A_Begin.aspx - ASPXCodeBehind - - - PatialEndConv_A_B_Begin.aspx - ASPXCodeBehind - - - PatialEndConv_A_B_End.aspx - ASPXCodeBehind - - - PatialEndConv_A_End.aspx - ASPXCodeBehind - - - RedirectErrorNoPauseConversation.aspx - ASPXCodeBehind - - - SerializeConversationTest.aspx - ASPXCodeBehind - - - SessionIsClosedA.aspx - ASPXCodeBehind - - - SessionIsClosedB.aspx - ASPXCodeBehind - - - SPCLazyLoadTest_A_Begin.aspx - ASPXCodeBehind - - - SPCLazyLoadTest_A_Status.aspx - ASPXCodeBehind - - - SPCSwitchConversationSameRequest.aspx - ASPXCodeBehind - - - TimeOut_NoTimeOut.aspx - ASPXCodeBehind - - - TimeOut_WithTimeOut.aspx - ASPXCodeBehind - - - - - - - - {3A3A4E65-45A6-4B20-B460-0BEDC302C02C} - Spring.Aop.2010 - - - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87} - Spring.ConversationWA.NH32.2010 - - - {710961A3-0DF4-49E4-A26E-F5B9C044AC84} - Spring.Core.2010 - - - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8} - Spring.Data.NHibernate32.2010 - - - {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} - Spring.Data.2010 - - - {BA4789EB-281A-48EA-8763-28B9F0596A18} - Spring.Web.2010 - - - - - - - - - - - - - - - - - - - - - False - Microsoft .NET Framework 4 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - - - - - - - - - - - Code - - - - - - - - - - - - - - - - - - - echo "Copying TestWebs to output directory" -rd /S /Q "$(TargetDir)Data" -xcopy "$(ProjectDir)Data" "$(TargetDir)Data\" /y /s -rd /S /Q "$(TargetDir)Data\Spring\ConversationWA\WebConversationStateTest\Bin" - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {2FB16852-22AD-4A5B-885A-97136265CC46} + Library + Properties + Spring + Spring.ConversationWA.NH32.Tests + + + 3.5 + v4.0 + + + http://localhost/Spring.ConversationWA.NH32.Tests/ + true + Web + true + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + true + false + true + + + true + full + false + ..\..\..\build\VS.Net.2010\Spring.ConversationWA.NH32.Tests\Debug\ + DEBUG;TRACE + prompt + 4 + ..\..\..\build\VS.Net.2010\Spring.ConversationWA.NH32.Tests\Debug\Spring.ConversationWA.NH32.Tests.XML + Program + $(MSBuildProjectDirectory)\..\..\dependencies\tools\NUnit-2.6.0.12051\bin\nunit-x86.exe + "$(MSBuildProjectDirectory)\$(OutputPath)\$(AssemblyName).dll" + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\Net\2.0\Common.Logging.dll + + + False + ..\..\..\lib\NHibernate32\net\3.5\NHibernate.dll + + + False + ..\..\..\lib\Net\2.0\nunit.framework.dll + + + False + ..\..\..\lib\Net\2.0\NUnitAspEx.dll + + + + 3.5 + + + + False + lib\net\2.0\System.Data.SQLite.dll + + + + + + + CommonAssemblyInfo.cs + + + + + + + ASPXCodeBehind + + + ASPXCodeBehind + + + + + + CircularDependenceTest.aspx + ASPXCodeBehind + + + ConnectionReleaseModeIssue.aspx + ASPXCodeBehind + + + EndConversationTestBegin.aspx + ASPXCodeBehind + + + EndConversationTestEnd.aspx + ASPXCodeBehind + + + EndPausedSessionIsClosedA.aspx + ASPXCodeBehind + + + EndPausedSessionIsClosedB.aspx + ASPXCodeBehind + + + EndPausedTest.aspx + ASPXCodeBehind + + + GetParentObjetFromChild.aspx + ASPXCodeBehind + + + IoeTests.aspx + ASPXCodeBehind + + + PatialEndConv_A_Begin.aspx + ASPXCodeBehind + + + PatialEndConv_A_B_Begin.aspx + ASPXCodeBehind + + + PatialEndConv_A_B_End.aspx + ASPXCodeBehind + + + PatialEndConv_A_End.aspx + ASPXCodeBehind + + + RedirectErrorNoPauseConversation.aspx + ASPXCodeBehind + + + SerializeConversationTest.aspx + ASPXCodeBehind + + + SessionIsClosedA.aspx + ASPXCodeBehind + + + SessionIsClosedB.aspx + ASPXCodeBehind + + + SPCLazyLoadTest_A_Begin.aspx + ASPXCodeBehind + + + SPCLazyLoadTest_A_Status.aspx + ASPXCodeBehind + + + SPCSwitchConversationSameRequest.aspx + ASPXCodeBehind + + + TimeOut_NoTimeOut.aspx + ASPXCodeBehind + + + TimeOut_WithTimeOut.aspx + ASPXCodeBehind + + + + + + + + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C} + Spring.Aop.2010 + + + {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87} + Spring.ConversationWA.NH32.2010 + + + {710961A3-0DF4-49E4-A26E-F5B9C044AC84} + Spring.Core.2010 + + + {9F0F739C-876E-4C4B-AA55-9AC9242C25C8} + Spring.Data.NHibernate32.2010 + + + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} + Spring.Data.2010 + + + {BA4789EB-281A-48EA-8763-28B9F0596A18} + Spring.Web.2010 + + + + + + + + + + + + + + + + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + echo "Copying TestWebs to output directory" +rd /S /Q "$(TargetDir)Data" +xcopy "$(ProjectDir)Data" "$(TargetDir)Data\" /y /s +rd /S /Q "$(TargetDir)Data\Spring\ConversationWA\WebConversationStateTest\Bin" + + \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Spring.ConversationWA.NH32.Tests.build b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Spring.ConversationWA.NH32.Tests.build similarity index 97% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Spring.ConversationWA.NH32.Tests.build rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Spring.ConversationWA.NH32.Tests.build index 0368c280..0c5b7ab3 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/Spring.ConversationWA.NH32.Tests.build +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Spring.ConversationWA.NH32.Tests.build @@ -1,127 +1,127 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/Spring/Data/Common/ConnectionCreationTrackingDbProvider.cs b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Spring/Data/Common/ConnectionCreationTrackingDbProvider.cs similarity index 100% rename from test/Spring/Spring.ConversationWA.NH32.Tests/Spring/Data/Common/ConnectionCreationTrackingDbProvider.cs rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/Spring/Data/Common/ConnectionCreationTrackingDbProvider.cs diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/app.config b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/app.config similarity index 97% rename from test/Spring/Spring.ConversationWA.NH32.Tests/app.config rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/app.config index 15184ef6..cc10890d 100644 --- a/test/Spring/Spring.ConversationWA.NH32.Tests/app.config +++ b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/app.config @@ -1,19 +1,19 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/lib/Mono/2.0/System.Data.SQLite.dll b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/lib/Mono/2.0/System.Data.SQLite.dll similarity index 100% rename from test/Spring/Spring.ConversationWA.NH32.Tests/lib/Mono/2.0/System.Data.SQLite.dll rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/lib/Mono/2.0/System.Data.SQLite.dll diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/lib/net/2.0/System.Data.SQLite.dll b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/lib/net/2.0/System.Data.SQLite.dll similarity index 100% rename from test/Spring/Spring.ConversationWA.NH32.Tests/lib/net/2.0/System.Data.SQLite.dll rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/lib/net/2.0/System.Data.SQLite.dll diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/lib/net/3.5/System.Data.SQLite.dll b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/lib/net/3.5/System.Data.SQLite.dll similarity index 100% rename from test/Spring/Spring.ConversationWA.NH32.Tests/lib/net/3.5/System.Data.SQLite.dll rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/lib/net/3.5/System.Data.SQLite.dll diff --git a/test/Spring/Spring.ConversationWA.NH32.Tests/lib/net/4.0/System.Data.SQLite.dll b/test/Spring/Spring.Web.Conversation.NHibernate32.Tests/lib/net/4.0/System.Data.SQLite.dll similarity index 100% rename from test/Spring/Spring.ConversationWA.NH32.Tests/lib/net/4.0/System.Data.SQLite.dll rename to test/Spring/Spring.Web.Conversation.NHibernate32.Tests/lib/net/4.0/System.Data.SQLite.dll diff --git a/test/Spring/Spring.ConversationWA.NH33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/Web.Config b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/Web.Config similarity index 97% rename from test/Spring/Spring.ConversationWA.NH33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/Web.Config rename to test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/Web.Config index f154858a..285fffc2 100644 --- a/test/Spring/Spring.ConversationWA.NH33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/Web.Config +++ b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/Web.Config @@ -1,99 +1,99 @@ - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/services.xml.config b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/services.xml.config similarity index 98% rename from test/Spring/Spring.ConversationWA.NH33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/services.xml.config rename to test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/services.xml.config index 28ebd70d..45615757 100644 --- a/test/Spring/Spring.ConversationWA.NH33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/services.xml.config +++ b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/services.xml.config @@ -1,353 +1,353 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - conversationManager - conversationManagerEndPaused - convMngEndPausedSessionIsClosed - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Spring.ConversationWA.NH33.Tests - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + conversationManager + conversationManagerEndPaused + convMngEndPausedSessionIsClosed + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Spring.ConversationWA.NH33.Tests + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/web.config.net-2.0 b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/web.config.net-2.0 similarity index 97% rename from test/Spring/Spring.ConversationWA.NH33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/web.config.net-2.0 rename to test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/web.config.net-2.0 index f154858a..285fffc2 100644 --- a/test/Spring/Spring.ConversationWA.NH33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/web.config.net-2.0 +++ b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Data/Spring/ConversationWA/WebConversationStateTest/web.config.net-2.0 @@ -1,99 +1,99 @@ - - - - -
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH33.Tests/Entities/SPCDetailEnt.hbm.xml b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Entities/SPCDetailEnt.hbm.xml similarity index 97% rename from test/Spring/Spring.ConversationWA.NH33.Tests/Entities/SPCDetailEnt.hbm.xml rename to test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Entities/SPCDetailEnt.hbm.xml index 570c2be2..05a5309b 100644 --- a/test/Spring/Spring.ConversationWA.NH33.Tests/Entities/SPCDetailEnt.hbm.xml +++ b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Entities/SPCDetailEnt.hbm.xml @@ -1,9 +1,9 @@ - - - - - - - - - + + + + + + + + + diff --git a/test/Spring/Spring.ConversationWA.NH33.Tests/Entities/SPCMasterEnt.hbm.xml b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Entities/SPCMasterEnt.hbm.xml similarity index 97% rename from test/Spring/Spring.ConversationWA.NH33.Tests/Entities/SPCMasterEnt.hbm.xml rename to test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Entities/SPCMasterEnt.hbm.xml index c9552a1a..08f04884 100644 --- a/test/Spring/Spring.ConversationWA.NH33.Tests/Entities/SPCMasterEnt.hbm.xml +++ b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Entities/SPCMasterEnt.hbm.xml @@ -1,13 +1,13 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/test/Spring/Spring.ConversationWA.NH33.Tests/Spring.ConversationWA.NH33.Tests.2008.csproj b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Spring.ConversationWA.NH33.Tests.2008.csproj similarity index 98% rename from test/Spring/Spring.ConversationWA.NH33.Tests/Spring.ConversationWA.NH33.Tests.2008.csproj rename to test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Spring.ConversationWA.NH33.Tests.2008.csproj index da20b1c6..b26c3706 100644 --- a/test/Spring/Spring.ConversationWA.NH33.Tests/Spring.ConversationWA.NH33.Tests.2008.csproj +++ b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Spring.ConversationWA.NH33.Tests.2008.csproj @@ -1,176 +1,176 @@ - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {C57B05EA-FD1A-40EC-BB60-D2E45AB1A86A} - Library - Properties - Spring - Spring.ConversationWA.NH33.Tests - - - 2.0 - v3.5 - - - - - - - true - full - false - ..\..\..\build\VS.Net.2008\Spring.ConversationWA.NH33.Tests\Debug\ - DEBUG;TRACE - prompt - 4 - - - Program - $(MSBuildProjectDirectory)\..\..\dependencies\tools\NUnit-2.6.0.12051\bin\nunit-x86.exe - "$(MSBuildProjectDirectory)\$(OutputPath)\$(AssemblyName).dll" - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\Net\2.0\Common.Logging.dll - - - False - ..\..\..\lib\Net\2.0\log4net.dll - - - False - ..\..\..\lib\NHibernate33\net\3.5\NHibernate.dll - - - False - ..\..\..\lib\Net\2.0\nunit.framework.dll - - - False - ..\..\..\lib\Net\2.0\NUnitAspEx.dll - - - - 3.5 - - - - False - ..\Spring.ConversationWA.NH32.Tests\lib\net\2.0\System.Data.SQLite.dll - - - - - - - CommonAssemblyInfo.cs - - - Bsn\ConversationEvidenceBsnImpl.cs - - - Bsn\IConversationEvidenceBsn.cs - - - Bsn\INoDeferedErrorBsn.cs - - - Bsn\NoDeferedErrorBsnImpl.cs - - - ConversationWA\PatialEndConvBeginBasePage.cs - ASPXCodeBehind - - - ConversationWA\PatialEndConvEndBasePage.cs - ASPXCodeBehind - - - ConversationWA\SerializeConversationTestModule.cs - - - ConversationWA\WebConversationStateTest.cs - - - Entities\SPCDetailEnt.cs - - - Entities\SPCMasterEnt.cs - - - Spring\Data\Common\CountGetConnDbProvider.cs - - - - - {3A3A4E65-45A6-4B20-B460-0BEDC302C02C} - Spring.Aop.2008 - - - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87} - Spring.ConversationWA.NH33.2008 - - - {710961A3-0DF4-49E4-A26E-F5B9C044AC84} - Spring.Core.2008 - - - {67EA5988-C54E-4348-BFFB-E4A61F26143C} - Spring.Data.NHibernate33.2008 - - - {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} - Spring.Data.2008 - - - {BA4789EB-281A-48EA-8763-28B9F0596A18} - Spring.Web.2008 - - - - - - - - - - - - - Data\Spring\ConversationWA\WebConversationStateTest\log4net.config - - - - - - - - - - - echo "Copying TestWebs to output directory" -rd /S /Q "$(TargetDir)Data" -xcopy "$(ProjectDir)..\Spring.ConversationWA.NH32.Tests\Data" "$(TargetDir)Data\" /y /s -xcopy "$(ProjectDir)Data" "$(TargetDir)Data\" /y /s -rd /S /Q "$(TargetDir)Data\Spring\ConversationWA\WebConversationStateTest\Bin" - - + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {C57B05EA-FD1A-40EC-BB60-D2E45AB1A86A} + Library + Properties + Spring + Spring.ConversationWA.NH33.Tests + + + 2.0 + v3.5 + + + + + + + true + full + false + ..\..\..\build\VS.Net.2008\Spring.ConversationWA.NH33.Tests\Debug\ + DEBUG;TRACE + prompt + 4 + + + Program + $(MSBuildProjectDirectory)\..\..\dependencies\tools\NUnit-2.6.0.12051\bin\nunit-x86.exe + "$(MSBuildProjectDirectory)\$(OutputPath)\$(AssemblyName).dll" + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\Net\2.0\Common.Logging.dll + + + False + ..\..\..\lib\Net\2.0\log4net.dll + + + False + ..\..\..\lib\NHibernate33\net\3.5\NHibernate.dll + + + False + ..\..\..\lib\Net\2.0\nunit.framework.dll + + + False + ..\..\..\lib\Net\2.0\NUnitAspEx.dll + + + + 3.5 + + + + False + ..\Spring.ConversationWA.NH32.Tests\lib\net\2.0\System.Data.SQLite.dll + + + + + + + CommonAssemblyInfo.cs + + + Bsn\ConversationEvidenceBsnImpl.cs + + + Bsn\IConversationEvidenceBsn.cs + + + Bsn\INoDeferedErrorBsn.cs + + + Bsn\NoDeferedErrorBsnImpl.cs + + + ConversationWA\PatialEndConvBeginBasePage.cs + ASPXCodeBehind + + + ConversationWA\PatialEndConvEndBasePage.cs + ASPXCodeBehind + + + ConversationWA\SerializeConversationTestModule.cs + + + ConversationWA\WebConversationStateTest.cs + + + Entities\SPCDetailEnt.cs + + + Entities\SPCMasterEnt.cs + + + Spring\Data\Common\CountGetConnDbProvider.cs + + + + + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C} + Spring.Aop.2008 + + + {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87} + Spring.ConversationWA.NH33.2008 + + + {710961A3-0DF4-49E4-A26E-F5B9C044AC84} + Spring.Core.2008 + + + {67EA5988-C54E-4348-BFFB-E4A61F26143C} + Spring.Data.NHibernate33.2008 + + + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} + Spring.Data.2008 + + + {BA4789EB-281A-48EA-8763-28B9F0596A18} + Spring.Web.2008 + + + + + + + + + + + + + Data\Spring\ConversationWA\WebConversationStateTest\log4net.config + + + + + + + + + + + echo "Copying TestWebs to output directory" +rd /S /Q "$(TargetDir)Data" +xcopy "$(ProjectDir)..\Spring.ConversationWA.NH32.Tests\Data" "$(TargetDir)Data\" /y /s +xcopy "$(ProjectDir)Data" "$(TargetDir)Data\" /y /s +rd /S /Q "$(TargetDir)Data\Spring\ConversationWA\WebConversationStateTest\Bin" + + \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH33.Tests/Spring.ConversationWA.NH33.Tests.2010.csproj b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Spring.ConversationWA.NH33.Tests.2010.csproj similarity index 98% rename from test/Spring/Spring.ConversationWA.NH33.Tests/Spring.ConversationWA.NH33.Tests.2010.csproj rename to test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Spring.ConversationWA.NH33.Tests.2010.csproj index 861310fa..0c79a089 100644 --- a/test/Spring/Spring.ConversationWA.NH33.Tests/Spring.ConversationWA.NH33.Tests.2010.csproj +++ b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Spring.ConversationWA.NH33.Tests.2010.csproj @@ -1,206 +1,206 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {C57B05EA-FD1A-40EC-BB60-D2E45AB1A86A} - Library - Properties - Spring - Spring.ConversationWA.NH33.Tests - - - 3.5 - v4.0 - - - http://localhost/Spring.ConversationWA.NH33.Tests/ - true - Web - true - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - true - false - true - - - true - full - false - ..\..\..\build\VS.Net.2010\Spring.ConversationWA.NH33.Tests\Debug\ - DEBUG;TRACE - prompt - 4 - - - Program - $(MSBuildProjectDirectory)\..\..\dependencies\tools\NUnit-2.6.0.12051\bin\nunit-x86.exe - "$(MSBuildProjectDirectory)\$(OutputPath)\$(AssemblyName).dll" - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\Net\2.0\Common.Logging.dll - - - False - ..\..\..\lib\NHibernate33\net\3.5\NHibernate.dll - - - False - ..\..\..\lib\Net\2.0\nunit.framework.dll - - - False - ..\..\..\lib\Net\2.0\NUnitAspEx.dll - - - - 3.5 - - - - False - ..\Spring.ConversationWA.NH32.Tests\lib\net\2.0\System.Data.SQLite.dll - - - - - - - CommonAssemblyInfo.cs - - - Bsn\ConversationEvidenceBsnImpl.cs - - - Bsn\IConversationEvidenceBsn.cs - - - Bsn\INoDeferedErrorBsn.cs - - - Bsn\NoDeferedErrorBsnImpl.cs - - - ConversationWA\PatialEndConvBeginBasePage.cs - ASPXCodeBehind - - - ConversationWA\PatialEndConvEndBasePage.cs - ASPXCodeBehind - - - ConversationWA\WebConversationStateTest.cs - - - Entities\SPCDetailEnt.cs - - - Entities\SPCMasterEnt.cs - - - Spring\Data\Common\ConnectionCreationTrackingDbProvider.cs - - - - - {3A3A4E65-45A6-4B20-B460-0BEDC302C02C} - Spring.Aop.2010 - - - {CF375928-B6D5-485C-B04D-2BC41D9DBF1E} - Spring.ConversationWA.NH33.2010 - - - {710961A3-0DF4-49E4-A26E-F5B9C044AC84} - Spring.Core.2010 - - - {D546EFB7-9F6C-4C11-B2F8-B85FAD135399} - Spring.Data.NHibernate33.2010 - - - {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} - Spring.Data.2010 - - - {BA4789EB-281A-48EA-8763-28B9F0596A18} - Spring.Web.2010 - - - - - - - - - - - - - - Data\Spring\ConversationWA\WebConversationStateTest\log4net.config - - - - - - - - - - False - Microsoft .NET Framework 4 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - - - - echo "Copying TestWebs to output directory" -rd /S /Q "$(TargetDir)Data" -xcopy "$(ProjectDir)..\Spring.ConversationWA.NH32.Tests\Data" "$(TargetDir)Data\" /y /s -xcopy "$(ProjectDir)Data" "$(TargetDir)Data\" /y /s -rd /S /Q "$(TargetDir)Data\Spring\ConversationWA\WebConversationStateTest\Bin" - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {C57B05EA-FD1A-40EC-BB60-D2E45AB1A86A} + Library + Properties + Spring + Spring.ConversationWA.NH33.Tests + + + 3.5 + v4.0 + + + http://localhost/Spring.ConversationWA.NH33.Tests/ + true + Web + true + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + true + false + true + + + true + full + false + ..\..\..\build\VS.Net.2010\Spring.ConversationWA.NH33.Tests\Debug\ + DEBUG;TRACE + prompt + 4 + + + Program + $(MSBuildProjectDirectory)\..\..\dependencies\tools\NUnit-2.6.0.12051\bin\nunit-x86.exe + "$(MSBuildProjectDirectory)\$(OutputPath)\$(AssemblyName).dll" + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\Net\2.0\Common.Logging.dll + + + False + ..\..\..\lib\NHibernate33\net\3.5\NHibernate.dll + + + False + ..\..\..\lib\Net\2.0\nunit.framework.dll + + + False + ..\..\..\lib\Net\2.0\NUnitAspEx.dll + + + + 3.5 + + + + False + ..\Spring.ConversationWA.NH32.Tests\lib\net\2.0\System.Data.SQLite.dll + + + + + + + CommonAssemblyInfo.cs + + + Bsn\ConversationEvidenceBsnImpl.cs + + + Bsn\IConversationEvidenceBsn.cs + + + Bsn\INoDeferedErrorBsn.cs + + + Bsn\NoDeferedErrorBsnImpl.cs + + + ConversationWA\PatialEndConvBeginBasePage.cs + ASPXCodeBehind + + + ConversationWA\PatialEndConvEndBasePage.cs + ASPXCodeBehind + + + ConversationWA\WebConversationStateTest.cs + + + Entities\SPCDetailEnt.cs + + + Entities\SPCMasterEnt.cs + + + Spring\Data\Common\ConnectionCreationTrackingDbProvider.cs + + + + + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C} + Spring.Aop.2010 + + + {CF375928-B6D5-485C-B04D-2BC41D9DBF1E} + Spring.ConversationWA.NH33.2010 + + + {710961A3-0DF4-49E4-A26E-F5B9C044AC84} + Spring.Core.2010 + + + {D546EFB7-9F6C-4C11-B2F8-B85FAD135399} + Spring.Data.NHibernate33.2010 + + + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} + Spring.Data.2010 + + + {BA4789EB-281A-48EA-8763-28B9F0596A18} + Spring.Web.2010 + + + + + + + + + + + + + + Data\Spring\ConversationWA\WebConversationStateTest\log4net.config + + + + + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + + echo "Copying TestWebs to output directory" +rd /S /Q "$(TargetDir)Data" +xcopy "$(ProjectDir)..\Spring.ConversationWA.NH32.Tests\Data" "$(TargetDir)Data\" /y /s +xcopy "$(ProjectDir)Data" "$(TargetDir)Data\" /y /s +rd /S /Q "$(TargetDir)Data\Spring\ConversationWA\WebConversationStateTest\Bin" + + \ No newline at end of file diff --git a/test/Spring/Spring.ConversationWA.NH33.Tests/Spring.ConversationWA.NH33.Tests.build b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Spring.ConversationWA.NH33.Tests.build similarity index 97% rename from test/Spring/Spring.ConversationWA.NH33.Tests/Spring.ConversationWA.NH33.Tests.build rename to test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Spring.ConversationWA.NH33.Tests.build index 18d479c6..497bdf62 100644 --- a/test/Spring/Spring.ConversationWA.NH33.Tests/Spring.ConversationWA.NH33.Tests.build +++ b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/Spring.ConversationWA.NH33.Tests.build @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/Spring/Spring.ConversationWA.NH33.Tests/app.config b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/app.config similarity index 97% rename from test/Spring/Spring.ConversationWA.NH33.Tests/app.config rename to test/Spring/Spring.Web.Conversation.NHibernate33.Tests/app.config index 15184ef6..cc10890d 100644 --- a/test/Spring/Spring.ConversationWA.NH33.Tests/app.config +++ b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/app.config @@ -1,19 +1,19 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/test/Spring/Spring.ConversationWA.NH33.Tests/nhibernate-mapping.xsd b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/nhibernate-mapping.xsd similarity index 97% rename from test/Spring/Spring.ConversationWA.NH33.Tests/nhibernate-mapping.xsd rename to test/Spring/Spring.Web.Conversation.NHibernate33.Tests/nhibernate-mapping.xsd index 5c81a4b8..db25ca17 100644 --- a/test/Spring/Spring.ConversationWA.NH33.Tests/nhibernate-mapping.xsd +++ b/test/Spring/Spring.Web.Conversation.NHibernate33.Tests/nhibernate-mapping.xsd @@ -1,1695 +1,1695 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A composite key may be modelled by a .NET class with a property for each key column. The class must be Serializable and override equals() and hashCode() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Namespace used to find not-Fully Qualified Type Names - - - - - Assembly used to find not-Fully Qualified Type Names - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - undefined|any|none|null|0|-1|... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The concrete collection should use a generic version or an object-based version. - - - - - - - - - - - - - - Types of polymorphism - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A composite key may be modelled by a .NET class with a property for each key column. The class must be Serializable and override equals() and hashCode() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Namespace used to find not-Fully Qualified Type Names + + + + + Assembly used to find not-Fully Qualified Type Names + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + undefined|any|none|null|0|-1|... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The concrete collection should use a generic version or an object-based version. + + + + + + + + + + + + + + Types of polymorphism + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file