Book Image

EJB 3 Developer Guide

By : Michael Sikora
Book Image

EJB 3 Developer Guide

By: Michael Sikora

Overview of this book

Table of Contents (18 chapters)
EJB 3 Developer Guide
Credits
About the Author
About the Reviewers
Preface
Annotations and Their Corresponding Packages

MDB Activation Configuration Properties


We have already seen the destinationType activation configuration property. In this section we will describe a few more configuration properties which are common to all EJB 3 compliant application servers.

acknowledgeMode

We have already come across message acknowledgment in the context of JMS Java applications. In the context of MDBs, without message acknowledgment from the EJB container to the JMS server, the server may re-send messages to the container. There are two values for acknowlegeMode

  • Auto-acknowledge—the EJB container sends an acknowledgement as soon as the message is received.

  • Dups-ok-acknowledge—the EJB container sends an acknowledgment any time after it has received the message. Consequently duplicate messages may be sent by the JMS server. The MDB must be programmed to handle duplicates.

An example of the syntax is:

@ActivationConfigProperty(propertyName = "acknowledgeMode",
propertyValue = "Auto-acknowledge")

The acknowledgeMode...