我们的团队已经得到了表现为一个问题:
基础提供失败的EnlistTransaction; 无法访问已释放的object.Object名:“交易”。
这似乎一旦出现,我们开始使用的TransactionScope来处理我们的应用程序的交易。
栈跟踪的顶部部分被捕获为:
在System.Data.EntityClient.EntityConnection.EnlistTransaction(事务的事务)在System.Data.Objects.ObjectContext.EnsureConnection()在System.Data.Objects.ObjectContext.ExecuteStoreCommand(字符串的CommandText,对象[]参数)在Reconciliation.Models。 BillLines.BillLines.Reconciliation.Interfaces.IBillLineEntities.ExecuteStoreCommand在Reconciliation.Models.Legacy.EntityDbEnvironment.ExecuteOracleSql(字符串SQL)在EntityDbEnvironment.cs(字符串,对象[]):线41
同时在MSDTC日志更新,我已经使用提取的位置说明 :
pid=7060 ;tid=7908 ;time=04/29/2013-16:38:30.269 ;seq=136 ;eventid=TRANSACTION_BEGUN ;tx_guid=60f6390c-7570-488a-97a9-2c3912c4ca3e ;"TM Identifier='(null) '" ;"transaction has begun, description :'<NULL>'"
pid=7060 ;tid=7908 ;time=04/29/2013-16:38:30.269 ;seq=137 ;eventid=RM_ENLISTED_IN_TRANSACTION ;tx_guid=60f6390c-7570-488a-97a9-2c3912c4ca3e ;"TM Identifier='(null) '" ;"resource manager #1002 enlisted as transaction enlistment #1. RM guid = 'defc4277-47a6-4cd9-b092-93a668e2097b'"
pid=7060 ;tid=7908 ;time=04/29/2013-16:38:31.658 ;seq=138 ;eventid=RECEIVED_ABORT_REQUEST_FROM_BEGINNER ;tx_guid=60f6390c-7570-488a-97a9-2c3912c4ca3e ;"TM Identifier='(null) '" ;"received request to abort the transaction from beginner"
pid=7060 ;tid=7908 ;time=04/29/2013-16:38:31.658 ;seq=139 ;eventid=TRANSACTION_ABORTING ;tx_guid=60f6390c-7570-488a-97a9-2c3912c4ca3e ;"TM Identifier='(null) '" ;"transaction is aborting"
pid=7060 ;tid=7908 ;time=04/29/2013-16:38:31.658 ;seq=140 ;eventid=RM_ISSUED_ABORT ;tx_guid=60f6390c-7570-488a-97a9-2c3912c4ca3e ;"TM Identifier='(null) '" ;"abort request issued to resource manager #1002 for transaction enlistment #1"
pid=7060 ;tid=7908 ;time=04/29/2013-16:38:31.658 ;seq=141 ;eventid=RM_ACKNOWLEDGED_ABORT ;tx_guid=60f6390c-7570-488a-97a9-2c3912c4ca3e ;"TM Identifier='(null) '" ;"received acknowledgement of abort request from the resource manager #1002 for transaction enlistment #1"
pid=7060 ;tid=7908 ;time=04/29/2013-16:38:31.658 ;seq=142 ;eventid=TRANSACTION_ABORTED ;tx_guid=60f6390c-7570-488a-97a9-2c3912c4ca3e ;"TM Identifier='(null) '" ;"transaction has been aborted"
正如你所看到的RECEIVED_ABORT_REQUEST_FROM_BEGINNER一秒钟后RM_ENLISTED_IN_TRANSACTION被记录下来。
我们不明白的地方这中止请求从起源,或者它为什么被提出。 引起该问题的SQL是一个简单的SELECT,我们可以通过我们的数据库客户端没有问题执行。
该应用程序的工作的大部分时间,只是偶尔显示此问题。
我们使用的是Oracle 10.2.0.5.0实体框架。
UPDATE
继从@Astrotrain建议我成立了System.Transactions的记录。 产生的最后一项是字面上切断虽然中途:
....
<ApplicationData>
<TraceData>
<DataItem>
<TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Information">
<TraceIdentifier>http://msdn.microsoft.com/2004/06/System/Transactions/TransactionScopeCreated</TraceIdentifier>
<Description>TransactionScope Created</Description>
<AppDomain>BillLineGeneratorUI.exe</AppDomain>
<ExtendedData xmlns="http://schemas.microsoft.com/2004/03/Transactions/TransactionScopeCreatedTraceRecord">
<TraceSource>[Base]
正如你所看到的实际上除了防止日志整理。 我可以从这个中学到什么? 有任何想法吗?