Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21895/NHibernate/Impl
Modified Files:
BatcherImpl.cs
Log Message:
Fixed up logging of open commands and readers.
Index: BatcherImpl.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/BatcherImpl.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** BatcherImpl.cs 30 Sep 2004 18:24:22 -0000 1.8
--- BatcherImpl.cs 30 Sep 2004 21:00:59 -0000 1.9
***************
*** 240,244 ****
// turning around and calling a diff method.
CloseQueryCommand( cmd, reader );
! LogClosePreparedCommands();
}
--- 240,246 ----
// turning around and calling a diff method.
CloseQueryCommand( cmd, reader );
! // CloseQueryCommand contains the logging so we don't need to call it
! // here - putting it in CloseQueryCommand(IDbCommand) will ensure it always gets called.
! //LogClosePreparedCommands();
}
***************
*** 287,291 ****
}
! // CloseCommand( cmd, null );
}
--- 289,293 ----
}
! LogClosePreparedCommands();
}
***************
*** 345,361 ****
private static void LogOpenPreparedCommands()
{
! if ( log.IsDebugEnabled )
{
log.Debug( "about to open: " + openCommandCount + " open IDbCommands, " + openReaderCount + " open DataReaders" );
}
- openCommandCount++;
}
private static void LogClosePreparedCommands()
{
! openCommandCount--;
!
! if ( log.IsDebugEnabled )
{
log.Debug( "done closing: " + openCommandCount + " open IDbCommands, " + openReaderCount + " open DataReaders" );
}
--- 347,362 ----
private static void LogOpenPreparedCommands()
{
! if( log.IsDebugEnabled )
{
log.Debug( "about to open: " + openCommandCount + " open IDbCommands, " + openReaderCount + " open DataReaders" );
+ openCommandCount++;
}
}
private static void LogClosePreparedCommands()
{
! if( log.IsDebugEnabled )
{
+ openCommandCount--;
log.Debug( "done closing: " + openCommandCount + " open IDbCommands, " + openReaderCount + " open DataReaders" );
}
***************
*** 364,373 ****
private static void LogOpenReaders()
{
! openReaderCount++;
}
private static void LogCloseReaders()
{
! openReaderCount--;
}
--- 365,380 ----
private static void LogOpenReaders()
{
! if( log.IsDebugEnabled )
! {
! openReaderCount++;
! }
}
private static void LogCloseReaders()
{
! if( log.IsDebugEnabled )
! {
! openReaderCount--;
! }
}
|