From: <aye...@us...> - 2009-10-17 23:44:26
|
Revision: 4769 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4769&view=rev Author: ayenderahien Date: 2009-10-17 23:44:14 +0000 (Sat, 17 Oct 2009) Log Message: ----------- Merging r4768 from trunk Adding current session id for actions that are performed outside of the session but belong the the session. Modified Paths: -------------- branches/2.1.x/nhibernate/src/NHibernate/Id/Insert/AbstractSelectingDelegate.cs branches/2.1.x/nhibernate/src/NHibernate/Persister/Collection/AbstractCollectionPersister.cs branches/2.1.x/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs branches/2.1.x/nhibernate/src/NHibernate/Type/DbTimestampType.cs Property Changed: ---------------- branches/2.1.x/nhibernate/src/ branches/2.1.x/nhibernate/src/NHibernate.Test/ Property changes on: branches/2.1.x/nhibernate/src ___________________________________________________________________ Modified: svn:mergeinfo - /trunk/nhibernate/src:4657 + /trunk/nhibernate/src:4657,4768 Modified: branches/2.1.x/nhibernate/src/NHibernate/Id/Insert/AbstractSelectingDelegate.cs =================================================================== --- branches/2.1.x/nhibernate/src/NHibernate/Id/Insert/AbstractSelectingDelegate.cs 2009-10-17 23:34:20 UTC (rev 4768) +++ branches/2.1.x/nhibernate/src/NHibernate/Id/Insert/AbstractSelectingDelegate.cs 2009-10-17 23:44:14 UTC (rev 4769) @@ -2,6 +2,7 @@ using System.Data.Common; using NHibernate.Engine; using NHibernate.Exceptions; +using NHibernate.Impl; using NHibernate.SqlCommand; using NHibernate.SqlTypes; @@ -48,6 +49,7 @@ } SqlString selectSQL = SelectSQL; + using (new SessionIdLoggingContext(session.SessionId)) try { //fetch the generated id in a separate query Modified: branches/2.1.x/nhibernate/src/NHibernate/Persister/Collection/AbstractCollectionPersister.cs =================================================================== --- branches/2.1.x/nhibernate/src/NHibernate/Persister/Collection/AbstractCollectionPersister.cs 2009-10-17 23:34:20 UTC (rev 4768) +++ branches/2.1.x/nhibernate/src/NHibernate/Persister/Collection/AbstractCollectionPersister.cs 2009-10-17 23:44:14 UTC (rev 4769) @@ -1504,6 +1504,7 @@ public int GetSize(object key, ISessionImplementor session) { + using(new SessionIdLoggingContext(session.SessionId)) try { IDbCommand st = session.Batcher.PrepareCommand(CommandType.Text, sqlSelectSizeString, KeyType.SqlTypes(factory)); @@ -1540,6 +1541,7 @@ private bool Exists(object key, object indexOrElement, IType indexOrElementType, SqlString sql, ISessionImplementor session) { + using(new SessionIdLoggingContext(session.SessionId)) try { List<SqlType> sqlTl = new List<SqlType>(KeyType.SqlTypes(factory)); @@ -1579,6 +1581,7 @@ public virtual object GetElementByIndex(object key, object index, ISessionImplementor session, object owner) { + using(new SessionIdLoggingContext(session.SessionId)) try { List<SqlType> sqlTl = new List<SqlType>(KeyType.SqlTypes(factory)); Modified: branches/2.1.x/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs =================================================================== --- branches/2.1.x/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs 2009-10-17 23:34:20 UTC (rev 4768) +++ branches/2.1.x/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs 2009-10-17 23:44:14 UTC (rev 4769) @@ -1230,6 +1230,7 @@ log.Debug("initializing lazy properties from datastore"); + using (new SessionIdLoggingContext(session.SessionId)) try { object result = null; @@ -1406,6 +1407,7 @@ log.Debug("Getting current persistent state for: " + MessageHelper.InfoString(this, id, Factory)); } + using (new SessionIdLoggingContext(session.SessionId)) try { IDbCommand st = session.Batcher.PrepareCommand(CommandType.Text, SQLSnapshotSelectString, IdentifierType.SqlTypes(factory)); @@ -1661,7 +1663,7 @@ { log.Debug("Getting version: " + MessageHelper.InfoString(this, id, Factory)); } - + using(new SessionIdLoggingContext(session.SessionId)) try { IDbCommand st = session.Batcher.PrepareQueryCommand(CommandType.Text, VersionSelectString, IdentifierType.SqlTypes(Factory)); @@ -2415,6 +2417,7 @@ IDbCommand sequentialSelect = null; IDataReader sequentialResultSet = null; bool sequentialSelectEmpty = false; + using (new SessionIdLoggingContext(session.SessionId)) try { if (hasDeferred) @@ -3917,6 +3920,7 @@ { session.Batcher.ExecuteBatch(); //force immediate execution of the insert + using (new SessionIdLoggingContext(session.SessionId)) try { IDbCommand cmd = @@ -4007,6 +4011,7 @@ /////////////////////////////////////////////////////////////////////// object[] snapshot = new object[naturalIdPropertyCount]; + using (new SessionIdLoggingContext(session.SessionId)) try { IDbCommand ps = session.Batcher.PrepareCommand(CommandType.Text, sql, IdentifierType.SqlTypes(factory)); Modified: branches/2.1.x/nhibernate/src/NHibernate/Type/DbTimestampType.cs =================================================================== --- branches/2.1.x/nhibernate/src/NHibernate/Type/DbTimestampType.cs 2009-10-17 23:34:20 UTC (rev 4768) +++ branches/2.1.x/nhibernate/src/NHibernate/Type/DbTimestampType.cs 2009-10-17 23:44:14 UTC (rev 4769) @@ -4,6 +4,7 @@ using log4net; using NHibernate.Engine; using NHibernate.Exceptions; +using NHibernate.Impl; using NHibernate.SqlCommand; using NHibernate.SqlTypes; @@ -58,6 +59,7 @@ var tsSelect = new SqlString(timestampSelectString); IDbCommand ps = null; IDataReader rs = null; + using (new SessionIdLoggingContext(session.SessionId)) try { ps = session.Batcher.PrepareCommand(CommandType.Text, tsSelect, EmptyParams); Property changes on: branches/2.1.x/nhibernate/src/NHibernate.Test ___________________________________________________________________ Modified: svn:ignore - bin obj .#* *.user *.xsx AssemblyInfo.cs hibernate.cfg.xml Debug Release *.aps *.eto [Bb]in [Dd]ebug [Rr]elease *resharper* *.xml + bin obj .#* *.user *.xsx AssemblyInfo.cs hibernate.cfg.xml Debug Release *.aps *.eto [Bb]in [Dd]ebug [Rr]elease *resharper* *.xml Summary.xslt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |