File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes Transaction- rollback the messages for singleton service in case error occurs(used MDB) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Transaction- rollback the messages for singleton service in case error occurs(used MDB)" Watch "Transaction- rollback the messages for singleton service in case error occurs(used MDB)" New topic
Author

Transaction- rollback the messages for singleton service in case error occurs(used MDB)

Neelam Hankare
Greenhorn

Joined: Jun 12, 2011
Posts: 3
Hi all,
I have tried implementing singleton servcie in MDB,but dint work as expected..Without MDB , implementation of Singleton service is wokring fine..but wanted to achieve transactionality..
More detail:
1. Singleton servcie will picked up the message from foriegn jms queue using onMessage().
2. It will send the message to some other service (like proxy service).
3. If some error occurs ,it should rollback the entire transaction as well as put the message to original queue..
4. Rollbacked message will get again picked up by singleton service without loosing sequencing.

In short, Message wont get loss until successful delivery.

Please suggest some few approach to achieve rollback operation...


Thanks,
Neelam.
Pazhanikanthan Periasamy
Greenhorn

Joined: Jul 18, 2011
Posts: 9
Do you realize what this technique will result in?

1. Let us say the queue contains multiple messages to be processed, and if the 1st message has a rollback error like the one which you described, none of the other messages will never be processed.

I would advice you a mechanism to create error queues and throw the erroneous messages into it for processing by another bean.
 
GeeCON Prague 2014
 
subject: Transaction- rollback the messages for singleton service in case error occurs(used MDB)