Java Reference
In-Depth Information
•
DUPS_OK_ACKNOWLEDGE
: With this, the delivered messages are being
lazily acknowledged; this means that the client might receive some duplicated
messages
•
CLIENT_ACKNOWLEDGES
: With this, the client manually acknowledges re-
ceived messages using the
acknowledge
method
The modes can be set when you retrieve
JMSContext
from a connection factory:
JMSContext context =
connectionFactory.createContext(JMSContext.CLIENT_ACKNOWLEDGE)
The first argument is an integer flag that accepts the values mentioned previously along
with a
SESSION_TRANSACTED
entry (which is the standard mode for JTA-managed
message-driven beans).