From: Richard B. <rb...@us...> - 2005-04-01 00:05:15
|
Update of /cvsroot/jcframework/dotnet/Providers/AF_MSSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18014/Providers/AF_MSSQL Modified Files: CMsSqlConnection.vb Log Message: Fixes for a number of issues with injected objects. Fixes for transactions when errors occur during the rollback, etc Fixes for removing event listeners from objects added to the cache to prevent multiple event firing. Index: CMsSqlConnection.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/Providers/AF_MSSQL/CMsSqlConnection.vb,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- CMsSqlConnection.vb 7 Feb 2005 07:37:36 -0000 1.1 +++ CMsSqlConnection.vb 1 Apr 2005 00:04:35 -0000 1.2 @@ -180,12 +180,12 @@ End If End If If Me.ManageTransactions Then + m_transactioncalls += 1 If Not Me.Started Then + Me.Started = True m_transaction = m_connection.BeginTransaction getPersistenceBrokerInstance().startCacheTransaction(Me.Database) End If - m_transactioncalls += 1 - Me.Started = True End If End Sub @@ -321,16 +321,17 @@ End If End If If Me.ManageTransactions Then - If m_transactioncalls = 1 Then + m_transactioncalls -= 1 + If m_transactioncalls = 0 Then Try m_transaction.Rollback() + Me.Started = False + m_transaction = Nothing Catch ex As Exception + Debug.WriteLine("rollback failed " & ex.Message) End Try getPersistenceBrokerInstance().rollbackCache(Me.Database) - Me.Started = False - m_transaction = Nothing End If - m_transactioncalls -= 1 End If End Sub @@ -432,12 +433,12 @@ End If End If If Me.ManageTransactions Then + m_transactioncalls += 1 If Not Me.Started Then + Me.Started = True m_transaction = m_connection.BeginTransaction(isolationLevel) getPersistenceBrokerInstance().startCacheTransaction(Me.Database) End If - m_transactioncalls += 1 - Me.Started = True End If End Sub |