• Post Reply Bookmark Topic Watch Topic
  • New Topic

JMS - Transaction processsing  RSS feed

Rajesh Bangalore
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

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.
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most of your questions are discussed in this.
For DB updates, the best understood persistence technology is JDBC. I never do updates directly from POJOS, I always use a DAO.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!