From: Richard B. <rb...@us...> - 2005-04-01 00:04:49
|
Update of /cvsroot/jcframework/dotnet/Providers/AF_PostgreSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18014/Providers/AF_PostgreSQL Modified Files: CPostgreSQLConnection.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: CPostgreSQLConnection.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/Providers/AF_PostgreSQL/CPostgreSQLConnection.vb,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- CPostgreSQLConnection.vb 7 Feb 2005 23:09:32 -0000 1.1 +++ CPostgreSQLConnection.vb 1 Apr 2005 00:04:37 -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 @@ -303,16 +303,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 |