Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

JMS & DB Operations - Success/Failure  RSS feed

 
Ranch Hand
Posts: 370
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are developing an application where the flow will be as below:

1. Get a message from JMS Queue
2. Process that message
3. Persist some info in DB
4. Put the output message in another Queue

We want that all of these operations should either be successful or none. How can we achieve this?

We are using Spring & Websphere as app server.
 
Sheriff
Posts: 23865
50
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want an XA (or distributed) transaction. Websphere supports that, if I recall correctly.
 
Vaibhav Gargs
Ranch Hand
Posts: 370
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul.

I read about XA transactions. Sorry but few queries:

Does Websphere need to support XA transactions or we need to handle it in programs?
How to configure it in WAS for JDBC & JMS?
What all changes will be made in the code to support XA transactions?
Can we achieve XA using Spring transactions only?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!