We are planning to use JMS - Point-to-Point mechanism. Once the message is read from Queue, we would like to save them in oracle database. What are the different options available for the transaction processing?
We are considering the following options.
1. Use Message Driven Beans to read the messages from
Queues. Use Container Managed Transactions ( CMP) and
use required attribute setting in Deployment descriptor.
This will ensure that if there are any previous
transactions, the message will be saved within the same
transaction. Otherwise, it will create new transaction
and commit the changes to oracle database.
2. Use some simple POJO's and write your own JDBC to save
into oracle database?
3. Use some object mapping relational tools like hibernate,
JDO and use their transaction control mechanism etc.
Are there any other options available for transaction
processing?
Also, My biggest concern is , what happens if the
message is read from message queue and if there is some
problem in saving to database(database is down etc)?
what happens to the message already read at that point?
Appreciate your suggestions, comments etc.
-
JMS - Transaction processing (2 messages)
- Posted by: Mahesh
- Posted on: June 29 2005 11:15 EDT
Threaded Messages (2)
- Option 1 will solve all your problems by Biswa Das on June 29 2005 11:59 EDT
- JMS - Transaction processing by James Strachan on July 14 2005 09:30 EDT
-
Option 1 will solve all your problems[ Go to top ]
- Posted by: Biswa Das
- Posted on: June 29 2005 11:59 EDT
- in response to Mahesh
Go for option 1 this will solve all your problems.
I hope the processing on messages before being saved to db can be rolled back. Not like a credit payment/mail sending job. If the activity can not be rolled back then i will suggest save messgae in activity log before going for processing and commit every thing once your transaction is complete -
JMS - Transaction processing[ Go to top ]
- Posted by: James Strachan
- Posted on: July 14 2005 09:30 EDT
- in response to Mahesh
Either MDBs or message driven POJOs sound fine. You might find this FAQ entry useful...
http://activemq.codehaus.org/Should+I+use+XA
James
LogicBlaze