activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Gomes <e.se...@gmail.com>
Subject Re: Possible NMS Transaction bug Transaction GUID not Unique
Date Fri, 12 Aug 2011 21:39:36 GMT
Thanks for the info on this issue.  Would you be able to enter a JIRA item
for this, along with any unit test code that exposes the problem?  Having
unit tests helps us ensure we have fixed the problem and guards against any
future regressions.

Best,
Jim

On Wed, Aug 10, 2011 at 10:50 PM, spenceee <spenceee@gmail.com> wrote:

> G'day, first time poster, apologies if I'm in the wrong forum.
>
> I think I have found a defect in the NMS 1.5.0 API regarding the allocation
> of a Resource Manager GUID in the NetTxConnection class.  This is sent to
> the MS DTC as a unique identifier for the resource manager.  I've read the
> source code for this class and it is derived from the BrokerInfo.BrokerID
> from the connection.  According to MSDN the ID needs to be:
>
> resourceManagerIdentifier
> A unique identifier for a resource manager, which should persist across
> resource manager failure or reboot.
>
> If I understand correctly, each new connection to the broker will get a new
> value for BrokerID.  Therefore I can see little value in deriving the GUID
> from the broker info.  I think it would make more sense for
> NetTxConnection.ResourceManagerGUID to set the value internally to
> Guid.NewGuid(); and then return this value.
>
>        internal resourceManagerGuid = Guid.NewGuid; //Guaranteed* unique
> and threadsafe.
>        internal Guid ResourceManagerGuid
>        {
>            get
>            {
>                 return resourceManagerGuid;
>            }
>        }
>
> The only reason I can see for receiving this error is if somehow the same
> brokerID is returned.  I am using 4 threads to make connections with to the
> broker concurrently on 4 separate Active MQ connection objects.
>
> I've santised the error I've received if it's helpful.
>
> Error : 2011/19/12 04:19:44 xxx: Source: System.Transactions
> Message: A resource manager with the same identifier is already registered
> with the specified transaction coordinator. (Exception from HRESULT:
> 0x8004D102)Stack:    at
> System.Transactions.Oletx.IDtcProxyShimFactory.CreateResourceManager(Guid
> resourceManagerIdentifier, IntPtr managedIdentifier, IResourceManagerShim&
> resourceManagerShim)
>   at
> System.Transactions.Oletx.OletxResourceManager.get_ResourceManagerShim()
>   at System.Transactions.Oletx.OletxResourceManager.Reenlist(Int32
> prepareInfoLength, Byte[] prepareInfo, IEnlistmentNotificationInternal
> enlistmentNotification)
>   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()
>   at
>
> Apache.NMS.ActiveMQ.NetTxConnection.CreateAtiveMQSession(AcknowledgementMode
> ackMode)
>   at Apache.NMS.ActiveMQ.Connection.CreateSession(AcknowledgementMode
> sessionAcknowledgementMode)
>   at xxx.TimeoutRead(Int32 timeOut, Boolean commit)
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Possible-NMS-Transaction-bug-Transaction-GUID-not-Unique-tp3735015p3735015.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message