Apache ServiceMix NMR #usernavbar() #printableicon() #pdficon() #feedicon()  
When you contribute content to this Wiki, you grant a license to the ASF for inclusion in ASF works (as per the Apache Software License).
  6. Transactions and clustering

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
{scrollbar}

Anchor
top
top

6. Transactions and clustering

ServiceMix 4 NMR handles transactions and clutering in a very different way than ServiceMix 3 does. The main driver behing this change is to align with the JBI specification and work around some problems that were found in the way clustering was handled.

In short, the NMR is not aware of transactions and does not do any specific processing: it simply passes along the transaction from endpoint to endpoint and let the components do the heavy work. The main consequence is that the NMR can not be considered a transactional resource anymore, which in turn leads to not being able to use the JMS and JCA flows from ServiceMix 3.

However, one benefit is the ability to send transactions asynchronously: an endpoint can send a transaction using the send() method instead of sendSync() and does not use a blocking thread to wait for the response. It thus consumes less resources and is more scalable.

Clustering is handled using explicit JMS endpoints at the moment, but we may provide another less verbose alternative in the future. Such endpoints can be created using the servicemix-jms component, or using Camel. To achieve recoverability, you need to configure the endpoint to use transactions. The benefits of this approach is that you have more control over the JMS layer used and it becomes much more efficient than using the JMS or JCA flow, because fewer JMS messages are needed.

#top

Wiki Markup
{scrollbar}