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 2010/10/25 20:47:40 UTC

[jira] Created: (AMQNET-290) Add an API model to NMS that allows providers to participate in Distributed Transactions.

Add an API model to NMS that allows providers to participate in Distributed Transactions.
-----------------------------------------------------------------------------------------

                 Key: AMQNET-290
                 URL: https://issues.apache.org/activemq/browse/AMQNET-290
             Project: ActiveMQ .Net
          Issue Type: New Feature
          Components: NMS
    Affects Versions: 1.4.0
            Reporter: Timothy Bish
            Assignee: Timothy Bish
            Priority: Minor
             Fix For: 1.5.0


Currently the NMS API doesn't define any way for the client to participate in distributed transactions.  The JMS model allows a for this using the Java XA transactions.  The JMS API defines an XAConnectionFactory, XAConnection, and XASession that provide the needed bits to interact with a Transaction Manager.

We should provide something similar in NMS that allows for a provider library like NMS.ActiveMQ to be used in distributed transactions in .NET most likely using the MSDTC.  The API could expose an IEnlistmentNotification implementation that allows the client to enlist the Transaction in a DTC controlled transaction as a Resource Manager.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-290) Add an API model to NMS that allows providers to participate in Distributed Transactions.

Posted by "Alexandre Gallice (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63040#action_63040 ] 

Alexandre Gallice commented on AMQNET-290:
------------------------------------------

Thanks for answer.

I understand that enlisting as a durable resource manager is difficult.

My only concern is about the side effects. I don't understand what's happening when the code using NMS crashes in the middle of a transaction ?
Do we lose the message ? Is the transaction aborted ?

Thanks again for the snapshot, I should be able to test it next week.

> Add an API model to NMS that allows providers to participate in Distributed Transactions.
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQNET-290
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-290
>             Project: ActiveMQ .Net
>          Issue Type: New Feature
>          Components: NMS
>    Affects Versions: 1.4.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 1.5.0
>
>
> Currently the NMS API doesn't define any way for the client to participate in distributed transactions.  The JMS model allows a for this using the Java XA transactions.  The JMS API defines an XAConnectionFactory, XAConnection, and XASession that provide the needed bits to interact with a Transaction Manager.
> We should provide something similar in NMS that allows for a provider library like NMS.ActiveMQ to be used in distributed transactions in .NET most likely using the MSDTC.  The API could expose an IEnlistmentNotification implementation that allows the client to enlist the Transaction in a DTC controlled transaction as a Resource Manager.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-290) Add an API model to NMS that allows providers to participate in Distributed Transactions.

Posted by "Alexandre Gallice (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63035#action_63035 ] 

Alexandre Gallice commented on AMQNET-290:
------------------------------------------

Hi,

  Does the current implementation support both local and distributed transactions ?
  
  Another point, if I understand correctly, in distributed mode NMS will be enlisted as durable.
  But in local mode, NMS will be enlisted as volatile.

  Am I correct ? If yes, what are the consequences ? Is the message lost ?

Regards

> Add an API model to NMS that allows providers to participate in Distributed Transactions.
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQNET-290
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-290
>             Project: ActiveMQ .Net
>          Issue Type: New Feature
>          Components: NMS
>    Affects Versions: 1.4.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 1.5.0
>
>
> Currently the NMS API doesn't define any way for the client to participate in distributed transactions.  The JMS model allows a for this using the Java XA transactions.  The JMS API defines an XAConnectionFactory, XAConnection, and XASession that provide the needed bits to interact with a Transaction Manager.
> We should provide something similar in NMS that allows for a provider library like NMS.ActiveMQ to be used in distributed transactions in .NET most likely using the MSDTC.  The API could expose an IEnlistmentNotification implementation that allows the client to enlist the Transaction in a DTC controlled transaction as a Resource Manager.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQNET-290) Add an API model to NMS that allows providers to participate in Distributed Transactions.

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQNET-290.
---------------------------------

    Resolution: Fixed

Added an implementation of this along with some tests in trunk.  

> Add an API model to NMS that allows providers to participate in Distributed Transactions.
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQNET-290
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-290
>             Project: ActiveMQ .Net
>          Issue Type: New Feature
>          Components: NMS
>    Affects Versions: 1.4.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 1.5.0
>
>
> Currently the NMS API doesn't define any way for the client to participate in distributed transactions.  The JMS model allows a for this using the Java XA transactions.  The JMS API defines an XAConnectionFactory, XAConnection, and XASession that provide the needed bits to interact with a Transaction Manager.
> We should provide something similar in NMS that allows for a provider library like NMS.ActiveMQ to be used in distributed transactions in .NET most likely using the MSDTC.  The API could expose an IEnlistmentNotification implementation that allows the client to enlist the Transaction in a DTC controlled transaction as a Resource Manager.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-290) Add an API model to NMS that allows providers to participate in Distributed Transactions.

Posted by "Alexandre Gallice (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63045#action_63045 ] 

Alexandre Gallice commented on AMQNET-290:
------------------------------------------

OK, I understand that it will work in 99% of all cases.

But the 1% missing is the difference between a good and a terrific library.

I will check out if I can find anything about recovery...

> Add an API model to NMS that allows providers to participate in Distributed Transactions.
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQNET-290
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-290
>             Project: ActiveMQ .Net
>          Issue Type: New Feature
>          Components: NMS
>    Affects Versions: 1.4.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 1.5.0
>
>
> Currently the NMS API doesn't define any way for the client to participate in distributed transactions.  The JMS model allows a for this using the Java XA transactions.  The JMS API defines an XAConnectionFactory, XAConnection, and XASession that provide the needed bits to interact with a Transaction Manager.
> We should provide something similar in NMS that allows for a provider library like NMS.ActiveMQ to be used in distributed transactions in .NET most likely using the MSDTC.  The API could expose an IEnlistmentNotification implementation that allows the client to enlist the Transaction in a DTC controlled transaction as a Resource Manager.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-290) Add an API model to NMS that allows providers to participate in Distributed Transactions.

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63046#action_63046 ] 

Timothy Bish commented on AMQNET-290:
-------------------------------------

You are welcome to contribute the other 1%

> Add an API model to NMS that allows providers to participate in Distributed Transactions.
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQNET-290
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-290
>             Project: ActiveMQ .Net
>          Issue Type: New Feature
>          Components: NMS
>    Affects Versions: 1.4.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 1.5.0
>
>
> Currently the NMS API doesn't define any way for the client to participate in distributed transactions.  The JMS model allows a for this using the Java XA transactions.  The JMS API defines an XAConnectionFactory, XAConnection, and XASession that provide the needed bits to interact with a Transaction Manager.
> We should provide something similar in NMS that allows for a provider library like NMS.ActiveMQ to be used in distributed transactions in .NET most likely using the MSDTC.  The API could expose an IEnlistmentNotification implementation that allows the client to enlist the Transaction in a DTC controlled transaction as a Resource Manager.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-290) Add an API model to NMS that allows providers to participate in Distributed Transactions.

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63039#action_63039 ] 

Timothy Bish commented on AMQNET-290:
-------------------------------------

SNAPSHOT build is available at:
http://people.apache.org/~tabish/nms-1.5.0/

The current implementation would function the same whether its a local transaction or a distributed transaction as that bit is transparent on the client side.  In either case the NMS client enlists as volatile as I can't make enough sense out of the MS docs to see how recovery works so I can map it back into the XA model that is required for interaction with ActiveMQ.  

> Add an API model to NMS that allows providers to participate in Distributed Transactions.
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQNET-290
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-290
>             Project: ActiveMQ .Net
>          Issue Type: New Feature
>          Components: NMS
>    Affects Versions: 1.4.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 1.5.0
>
>
> Currently the NMS API doesn't define any way for the client to participate in distributed transactions.  The JMS model allows a for this using the Java XA transactions.  The JMS API defines an XAConnectionFactory, XAConnection, and XASession that provide the needed bits to interact with a Transaction Manager.
> We should provide something similar in NMS that allows for a provider library like NMS.ActiveMQ to be used in distributed transactions in .NET most likely using the MSDTC.  The API could expose an IEnlistmentNotification implementation that allows the client to enlist the Transaction in a DTC controlled transaction as a Resource Manager.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-290) Add an API model to NMS that allows providers to participate in Distributed Transactions.

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62817#action_62817 ] 

Timothy Bish commented on AMQNET-290:
-------------------------------------

Things are a bit tricky on .NET in that the System.Transactions classes can be in Local or Distributed mode depending on the configuration of the client.  For distributed transactions we really need to be able to map the DTC id's into Xid's but MS seems to have made this pretty tough in .NET.  When in local mode what should we do, just play nice and use standard local transactions or refuse to play altogether.  This implies that we'd have to manage the enlistment though since in local mode we can't do recovery so we'd have to be sure we are enlisted as volatile.  

> Add an API model to NMS that allows providers to participate in Distributed Transactions.
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQNET-290
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-290
>             Project: ActiveMQ .Net
>          Issue Type: New Feature
>          Components: NMS
>    Affects Versions: 1.4.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 1.5.0
>
>
> Currently the NMS API doesn't define any way for the client to participate in distributed transactions.  The JMS model allows a for this using the Java XA transactions.  The JMS API defines an XAConnectionFactory, XAConnection, and XASession that provide the needed bits to interact with a Transaction Manager.
> We should provide something similar in NMS that allows for a provider library like NMS.ActiveMQ to be used in distributed transactions in .NET most likely using the MSDTC.  The API could expose an IEnlistmentNotification implementation that allows the client to enlist the Transaction in a DTC controlled transaction as a Resource Manager.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-290) Add an API model to NMS that allows providers to participate in Distributed Transactions.

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63044#action_63044 ] 

Timothy Bish commented on AMQNET-290:
-------------------------------------

Enlisting durable isn't hard, its the recovery portion that is just not really documented by MS.  

Its possible Messages could be lost if the client app crashes outright during a commit operation after the prepare phase had ended successfully otherwise the broker would detect the connection loss and redeliver messages to a different consumer eventually.  

> Add an API model to NMS that allows providers to participate in Distributed Transactions.
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQNET-290
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-290
>             Project: ActiveMQ .Net
>          Issue Type: New Feature
>          Components: NMS
>    Affects Versions: 1.4.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 1.5.0
>
>
> Currently the NMS API doesn't define any way for the client to participate in distributed transactions.  The JMS model allows a for this using the Java XA transactions.  The JMS API defines an XAConnectionFactory, XAConnection, and XASession that provide the needed bits to interact with a Transaction Manager.
> We should provide something similar in NMS that allows for a provider library like NMS.ActiveMQ to be used in distributed transactions in .NET most likely using the MSDTC.  The API could expose an IEnlistmentNotification implementation that allows the client to enlist the Transaction in a DTC controlled transaction as a Resource Manager.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-290) Add an API model to NMS that allows providers to participate in Distributed Transactions.

Posted by "Alexandre Gallice (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63004#action_63004 ] 

Alexandre Gallice commented on AMQNET-290:
------------------------------------------

Very good,

  I'm really interested in testing this: What's the simplest way ? Via Fuse support ?



> Add an API model to NMS that allows providers to participate in Distributed Transactions.
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQNET-290
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-290
>             Project: ActiveMQ .Net
>          Issue Type: New Feature
>          Components: NMS
>    Affects Versions: 1.4.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 1.5.0
>
>
> Currently the NMS API doesn't define any way for the client to participate in distributed transactions.  The JMS model allows a for this using the Java XA transactions.  The JMS API defines an XAConnectionFactory, XAConnection, and XASession that provide the needed bits to interact with a Transaction Manager.
> We should provide something similar in NMS that allows for a provider library like NMS.ActiveMQ to be used in distributed transactions in .NET most likely using the MSDTC.  The API could expose an IEnlistmentNotification implementation that allows the client to enlist the Transaction in a DTC controlled transaction as a Resource Manager.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.