• 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

MDB deadlock - how to solve it?

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody.

I have a simple message-driven bean which has a simple task - get a message, extract some data and store it in the database.

Everything works smoothly until an exception is thrown - for instance, the column in the database table is too small to fit a String. As a result I get a deadlock, since the MDB doesn't eat the message but instead puts it back into the queue, gets it again, throws exception, puts it back etc.

How do I get rid of this? Better said, what do I need to put in DD or the code so that MDB eats the message instead of putting it back?

Thanks in advance for any kind of help. Cheers!
 
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Message acknowledgement is part of transaction in CMT MDB. if its rolled back, message is not acknowledged by container and thus redelivered. So using 'Not Supported' attribute for transaction for MDB may work or let the MDB be BMT.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic