You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2012/11/28 23:21:58 UTC

[jira] [Commented] (AMQNET-400) IllegalOperationException thrown from NetTxConnection.CreateNetTxSession()

    [ https://issues.apache.org/jira/browse/AMQNET-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13505970#comment-13505970 ] 

Timothy Bish commented on AMQNET-400:
-------------------------------------

Need to provide a test case that can reproduce this problem. 
                
> IllegalOperationException thrown from NetTxConnection.CreateNetTxSession()
> --------------------------------------------------------------------------
>
>                 Key: AMQNET-400
>                 URL: https://issues.apache.org/jira/browse/AMQNET-400
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: NMS
>    Affects Versions: 1.5.6
>         Environment: Windows 7 X64. Dotnet 4. MSSQL 2008 on remote machine. Activemq server on remote machine.
>            Reporter: MÃ¥rten Gustafsson
>            Assignee: Jim Gomes
>
> I create one INetTxConnection which is used for all threads. Each thread creates a INetTxSession. Within the session each received message is inside a new TransactionScope. Database update and message sending is within the same transaction.
> One thread is responsible for creating other threads, after reading an initial message on a separate queue.
> When I get IOException or BrokerException, all treads are terminated and the connection is disposed. A new connection is created and processing is continued.
> I get the following execption after running for a while:
> System.InvalidOperationException: Calling TransactionManager.Reenlist is not allowed after TransactionManager.RecoveryComplete is called for a given resource manager identifier.
>    at System.Transactions.Oletx.OletxTransactionManager.ReenlistTransaction(Guid resourceManagerIdentifier, Byte[] recoveryInformation, IEnlistmentNotificationInternal enlistmentNotification)
>    at System.Transactions.TransactionManager.Reenlist(Guid resourceManagerIdentifier, Byte[] recoveryInformation, IEnlistmentNotification enlistmentNotification)
>    at Apache.NMS.ActiveMQ.TransactionContext.InitializeDtcTxContext() in c:\dev\NMS.ActiveMQ\src\main\csharp\TransactionContext.cs:line 671
>    at Apache.NMS.ActiveMQ.NetTxSession..ctor(Connection connection, SessionId id) in c:\dev\NMS.ActiveMQ\src\main\csharp\NetTxSession.cs:line 31
>    at Apache.NMS.ActiveMQ.NetTxConnection.CreateAtiveMQSession(AcknowledgementMode ackMode) in c:\dev\NMS.ActiveMQ\src\main\csharp\NetTxConnection.cs:line 56
>    at Apache.NMS.ActiveMQ.Connection.CreateSession(AcknowledgementMode sessionAcknowledgementMode) in c:\dev\NMS.ActiveMQ\src\main\csharp\Connection.cs:line 472
>    at Apache.NMS.ActiveMQ.NetTxConnection.CreateNetTxSession() in c:\dev\NMS.ActiveMQ\src\main\csharp\NetTxConnection.cs:line 43

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira