Another article on Distributed transactions

3 02 2009

I found this new article at at JavaWorld, written by Dr. David Syer, who works for SpringSource . The article elaborates on using different transactional strategies/patterns and provides some advice on which strategy/pattern to use in a particular scenario.

The emphasis was primarily on using distributed transactions without XA (read overhead), of course, with some trade-offs. I found it very informative.

Understanding JMS messaging

25 07 2007

To my surprise, I am learning that there are very few java developers/programmers who understand the JMS specificaiton. There was this application which was consuming messages using a synchronous recieve call (with an AUTO_ACK mode), the programmer was expecting that the message be re-delivered if his application fails after the receive() and eventually blames the JMS server. The programmers fail to understand the difference between synchronous receive() and asynchornous receive (via MessageListener).

In another instance, I was informed that the JMS server was not JMS compliant just because it wasn’t closing the producer explicitly. The architects of that application were thinking that java’s garbage collection would take care of cleaning up the producers, if not explicitly closed. The JMS 1.1 spec is pretty clear on this and I find it very difficult to understand why and how one can interpret this differently.

The same is the case when a standalone application uses Spring MDP’s for consuming messages. Spring has this DefaultMessageListenerContainer which does a synchronous receive(). If one were to set the AUTO_ACK acknowledge mode, and the application fails after the receive() call, the message is lost. This is not clear to many of the users.

Maybe it is time for someone to come up with a list of messaging anti-patterns and educate the JMS/messaging community in general.

My article – XA transactions using Spring framework.

24 05 2007

I recently authored my second article at JavaWorld. It mainly demonstrates how one can utilize distributed transactions (JTA/XA) in standalone Java applications. The article focuses on how one can integrate different standalone JTA implementations (JBossTS, Atomikos and Bitronix) using the widely popular Spring framework. Please let me know your comments, if you get a chance to read.