• 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Glassfish: How do I set endpointExceptionRedeliveryAttempts for a standalone JMS client?

Posts: 2759
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a standalone JMS client that is listening to messages from a queue on a Glassfish server. I am opening a transacted session. In case of error, I am calling rollback on the session. Hewre's the code

THis code works fine when there is no exception in my listener. When there is a exception in TryPoison.doTransaction method, the TransactedReceiver catches it and rolls back the transaction. This causes the message to be sent back. So, a poison message keeps getting sent back immediately. Clearly, this is unacceptabole behavior

The docs say that I should be able to set endpointExceptionRedeliveryAttempts on the ActivationBean of the Queue. But, I cannot find documentation on how to do that. I can;t find any place in the Glassfish Admin Console where I can set it, and I can't find any documentation how can I do this from java. I tried implementing a MDB and setting the activation config, and it gives me same result

Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic