Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

Jayesh A Lalwani
Posts: 2762
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • 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

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic