my dog learned polymorphism*
The moose likes EJB and other Java EE Technologies and the fly likes JMS - Transaction processsing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS - Transaction processsing" Watch "JMS - Transaction processsing" New topic
Author

JMS - Transaction processsing

Rajesh Bangalore
Greenhorn

Joined: Jun 17, 2005
Posts: 9
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.
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Most of your questions are discussed in this.
http://www.coderanch.com/t/160869/java-EJB-SCBCD/certification/transaction-when-multiple-database-connections
For DB updates, the best understood persistence technology is JDBC. I never do updates directly from POJOS, I always use a DAO.


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS - Transaction processsing