• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic