• Post Reply Bookmark Topic Watch Topic
  • New Topic

JMS Distributed Transactions

 
Bahadur Shah
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a single transaction, I need to perform
1. A DB Operation and
2. Send a Message to JMS Queue
I need to do this from a Servlet.

I'm trying to prepare a solution for this, and any inputs on this will be grateful

1. Since this is a distributed transaction, all the Participants in the transactions must support XA
So, I need to create XADatasource to perform DB Operations
and I need to use XAQueueConnectionFactory, XAQueueConnection, XAQueueSession for JMS Operations

Are they mandatory or any alternatives available?

2. Since Im running on Servlet where there is no CMT support, I need to use UserTransaction
UserTransaction utx = new UserTransaction();
utx.begin();
//Perform DB Operations
// Send JMS Messages
utx.commit();

Can somebody validate my understanding please... Is it a feasible solution?
Is there any alternative or better solution available?
// Perform DB Operation

My server is NetWeaverApplicationServer.
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XA using JTA UserTransaction is the right way to go.

ram.
 
Pallav Bora
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I second Ram
 
Sachin Chandra
Greenhorn
Posts: 7
Hibernate Java Tomcat Server
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!