Author: gbayon
Date: Sun Jun 29 06:08:50 2008
New Revision: 672621
URL: http://svn.apache.org/viewvc?rev=672621&view=rev
Log:
Update to CacheModel, activate the LoggingCache decorator
Modified:
ibatis/trunk/cs/V3/src/Apache.Ibatis.Common/Data/DbProvider.cs
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Cache/CacheModel.cs
Modified: ibatis/trunk/cs/V3/src/Apache.Ibatis.Common/Data/DbProvider.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.Common/Data/DbProvider.cs?rev=672621&r1=672620&r2=672621&view=diff
==============================================================================
--- ibatis/trunk/cs/V3/src/Apache.Ibatis.Common/Data/DbProvider.cs (original)
+++ ibatis/trunk/cs/V3/src/Apache.Ibatis.Common/Data/DbProvider.cs Sun Jun 29
06:08:50 2008
@@ -104,9 +104,7 @@
[NonSerialized]
private bool _allowMARS = false;
-
-// private static readonly ILog _connectionLogger =
LogManager.GetLogger("System.Data.IDbConnection");
-
+
#endregion
#region Properties
Modified:
ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Cache/CacheModel.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Cache/CacheModel.cs?rev=672621&r1=672620&r2=672621&view=diff
==============================================================================
--- ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Cache/CacheModel.cs
(original)
+++ ibatis/trunk/cs/V3/src/Apache.Ibatis.DataMapper/Model/Cache/CacheModel.cs
Sun Jun 29 06:08:50 2008
@@ -31,6 +31,8 @@
using System.Diagnostics;
using Apache.Ibatis.Common.Contracts;
using Apache.Ibatis.Common.Exceptions;
+using Apache.Ibatis.Common.Logging;
+using Apache.Ibatis.Common.Logging.Impl;
using Apache.Ibatis.Common.Utilities;
using Apache.Ibatis.DataMapper.MappedStatements;
using Apache.Ibatis.DataMapper.Model.Cache.Decorators;
@@ -47,16 +49,15 @@
[DebuggerDisplay("CacheModel: {Id}-{Cache}")]
public class CacheModel
{
+ private ICache cache = null;
+ private readonly IList<string> statementFlushNames = new
List<string>();
+
/// <summary>
/// This is used to represent null objects that are returned from the
cache so
/// that they can be cached, too.
/// </summary>
public readonly static object NULL_OBJECT = new Object();
- private ICache cache = null;
-
- private readonly IList<string> statementFlushNames = new
List<string>();
-
/// <summary>
/// Identifier used to identify the CacheModel amongst the
others.
/// </summary>
@@ -135,7 +136,11 @@
{
cache = cache = new SharedCache(cache);
}
- cache = new SynchronizedCache(cache);
+ if (!(LogManager.Adapter is NoOpLoggerFA))
+ {
+ cache = new LoggingCache(cache);
+ }
+ cache = new SynchronizedCache(cache);
}
catch (Exception e)
{