From: Michael D. <mik...@us...> - 2004-12-05 18:42:37
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Transaction In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8577/NHibernate/Transaction Modified Files: Transaction.cs Log Message: NH-159 - modified so there is not an unnecessary log message about commands and transactions not being consistent. Index: Transaction.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Transaction/Transaction.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Transaction.cs 19 Sep 2004 16:15:00 -0000 1.5 --- Transaction.cs 5 Dec 2004 18:42:16 -0000 1.6 *************** *** 31,38 **** if( trans==null ) { ! if(command.Transaction!=null) { ! log.Warn("set a nonnull IDbCommand.Transaction to null because the Session had no Transaction"); } command.Transaction = null; return; --- 31,42 ---- if( trans==null ) { ! if( log.IsWarnEnabled ) { ! if( command.Transaction!=null ) ! { ! log.Warn("set a nonnull IDbCommand.Transaction to null because the Session had no Transaction"); ! } } + command.Transaction = null; return; *************** *** 40,50 **** else { ! ! // got into here because the command was being initialized and had a null Transaction - probably ! // don't need to be confused by that - just a normal part of initialization... ! if(command.Transaction!=null) { ! log.Warn("The IDbCommand had a different Transaction than the Session. This can occur when " + ! "Disconnecting and Reconnecting Sessions because the PreparedCommand Cache is Session specific."); } --- 44,56 ---- else { ! if( log.IsWarnEnabled ) { ! // got into here because the command was being initialized and had a null Transaction - probably ! // don't need to be confused by that - just a normal part of initialization... ! if( command.Transaction!=null && command.Transaction!=trans ) ! { ! log.Warn("The IDbCommand had a different Transaction than the Session. This can occur when " + ! "Disconnecting and Reconnecting Sessions because the PreparedCommand Cache is Session specific."); ! } } |