Page 1 of 1

About Question enthuware.oce-ejbd.v6.2.418 :

Posted: Wed Oct 01, 2014 2:56 pm
by supergiu
Hi,
about this sentence:
To achieve this you also need to set appropriate message retention policy at the destination. A message is guaranteed to be delivered once and only once by a JMS provider if the delivery mode of the message is PERSISTENT and if the destination has a sufficient message retention policy.
Sorry I didn't quite understand what means "sufficient message retention policy".

Thank you very much.

Re: About Question enthuware.oce-ejbd.v6.2.418 :

Posted: Wed Oct 01, 2014 7:09 pm
by admin
Message retention means for how long is a message retained by the container for delivery if the receiver is not available at that time. See that @Retention annotation here: http://docs.oracle.com/javaee/6/api/jav ... riven.html

HTH,
Paul.

Re: About Question enthuware.oce-ejbd.v6.2.418 :

Posted: Thu Apr 09, 2015 8:46 am
by n4noman
What is the behavior if exception is thrown from onMessage()? Doesn't it redelivers the message?

Re: About Question enthuware.oce-ejbd.v6.2.418 :

Posted: Thu Apr 09, 2015 8:33 pm
by admin
As per Section 5.4.18, if a message-driven bean uses bean-managed transaction demarcation and throws a , the container should not acknowledge the message. Therefore the message will be redelivered.

Or you can use container managed transactions with transaction attribute of REQUIRED. In this case also the message will be redelivered.

But both of the above assume that the receiver is up. They may not work if the receiver is not present.