You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by gb...@apache.org on 2005/07/25 19:30:35 UTC

svn commit: r225155 - in /ibatis/trunk/cs/mapper: IBatisNet.DataAccess.Test/bin/Debug/providers.config IBatisNet.DataAccess/Configuration/DaoProxy.cs IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs

Author: gbayon
Date: Mon Jul 25 10:30:24 2005
New Revision: 225155

URL: http://svn.apache.org/viewcvs?rev=225155&view=rev
Log:
- Improved error catching in proxy dao
- Fixed error in DomDaoManagerBuilder

Modified:
    ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/providers.config
    ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DaoProxy.cs
    ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/providers.config
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/providers.config?rev=225155&r1=225154&r2=225155&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/providers.config (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataAccess.Test/bin/Debug/providers.config Mon Jul 25 10:30:24 2005
@@ -126,7 +126,7 @@
 	<provider
 		name="ByteFx"
 		description="MySQL, ByteFx provider V0.7.6.15073"
-		enabled="true"
+		enabled="false"
 		assemblyName="ByteFX.MySqlClient, Version=0.7.6.15073, Culture=neutral, PublicKeyToken=f2fef6fed1732fc1"
 		connectionClass="ByteFX.Data.MySqlClient.MySqlConnection" 
 		commandClass="ByteFX.Data.MySqlClient.MySqlCommand"

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DaoProxy.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DaoProxy.cs?rev=225155&r1=225154&r2=225155&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DaoProxy.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DaoProxy.cs Mon Jul 25 10:30:24 2005
@@ -25,14 +25,15 @@
 #endregion
 
 #region Imports
+
 using System;
 using System.Collections;
-using System.Xml.Serialization;
+using System.Reflection;
+using Castle.DynamicProxy;
 using IBatisNet.Common.Logging;
-using IBatisNet.DataAccess.Interfaces;
 using IBatisNet.DataAccess.Exceptions;
+using IBatisNet.DataAccess.Interfaces;
 
-using Castle.DynamicProxy;
 #endregion
 
 namespace IBatisNet.DataAccess.Configuration
@@ -45,7 +46,7 @@
 		#region Fields
 		private static ArrayList _passthroughMethods = new ArrayList();
 		private Dao _daoImplementation;
-		private static readonly ILog _logger = LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod().DeclaringType );
+		private static readonly ILog _logger = LogManager.GetLogger( MethodBase.GetCurrentMethod().DeclaringType );
 		#endregion
 
 		#region Constructor (s) / Destructor
@@ -126,7 +127,14 @@
 					} 
 					catch (Exception e) 
 					{
-						throw new DataAccessException("Unable to intercept method name "+invocation.Method.Name, e);
+						if (e is DataAccessException)
+						{
+							throw;
+						}
+						else
+						{
+							throw new DataAccessException("Unable to intercept method name "+invocation.Method.Name, e);
+						}
 					}
 				} 
 				else 
@@ -145,7 +153,14 @@
 					} 
 					catch (Exception e) 
 					{
-						throw new DataAccessException("Unable to intercept method name "+invocation.Method.Name, e);
+						if (e is DataAccessException)
+						{
+							throw;
+						}
+						else
+						{
+							throw new DataAccessException("Unable to intercept method name "+invocation.Method.Name, e);
+						}
 					} 
 					finally 
 					{

Modified: ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs?rev=225155&r1=225154&r2=225155&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs Mon Jul 25 10:30:24 2005
@@ -562,7 +562,7 @@
 				}
 
 				// Configure the sessionHandler
-				configurationScope.ErrorContext.ObjectId = sessionHandler.GetType().FullName;
+				configurationScope.ErrorContext.ObjectId = typeSessionHandler.FullName;
 
 				try
 				{