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/04/18 19:11:23 UTC
svn commit: r161775 -
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapSession.cs
Author: gbayon
Date: Mon Apr 18 10:11:22 2005
New Revision: 161775
URL: http://svn.apache.org/viewcvs?view=rev&rev=161775
Log:
- Fixed JIRA-34
Modified:
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapSession.cs
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapSession.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapSession.cs?view=diff&r1=161774&r2=161775
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapSession.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapSession.cs Mon Apr 18 10:11:22 2005
@@ -151,11 +151,11 @@
_connection.ConnectionString = _dataSource.ConnectionString;
try
{
+ _connection.Open();
if (_logger.IsDebugEnabled)
{
_logger.Debug("Open Connection");
}
- _connection.Open();
}
catch(Exception ex)
{
@@ -167,6 +167,10 @@
try
{
_connection.Open();
+ if (_logger.IsDebugEnabled)
+ {
+ _logger.Debug("Open Connection");
+ }
}
catch(Exception ex)
{
@@ -201,11 +205,11 @@
{
OpenConnection();
}
+ _transaction = _connection.BeginTransaction();
if (_logger.IsDebugEnabled)
{
_logger.Debug("Begin Transaction");
}
- _transaction = _connection.BeginTransaction();
_isOpenTransaction = true;
}
@@ -225,11 +229,11 @@
{
throw new DataMapperException("SqlMapSession could not invoke BeginTransaction(). A Connection must be started. Call OpenConnection() first.");
}
+ _transaction = _connection.BeginTransaction();
if (_logger.IsDebugEnabled)
{
_logger.Debug("Begin Transaction");
}
- _transaction = _connection.BeginTransaction();
_isOpenTransaction = true;
}
}
@@ -246,11 +250,11 @@
{
OpenConnection();
}
+ _transaction = _connection.BeginTransaction(isolationLevel);
if (_logger.IsDebugEnabled)
{
_logger.Debug("Begin Transaction");
}
- _transaction = _connection.BeginTransaction(isolationLevel);
_isOpenTransaction = true;
}
@@ -272,11 +276,11 @@
{
throw new DataMapperException("SqlMapSession could not invoke StartTransaction(). A Connection must be started. Call OpenConnection() first.");
}
+ _transaction = _connection.BeginTransaction(isolationLevel);
if (_logger.IsDebugEnabled)
{
_logger.Debug("Start Transaction");
}
- _transaction = _connection.BeginTransaction(isolationLevel);
_isOpenTransaction = true;
}
}