Java Reference
In-Depth Information
Table 4.1. Activation properties for a JMS provider standardized by the JMS 2.0 spec
Activation property
The JNDI lookup of a javax.jms.Queue or a javax.jms.Topic.
The JNDI lookup of a javax.jms.ConnectionFactory,
javax.jms.QueueConnectionFactory, or javax.jms.TopicConnectionFactory.
Auto-acknowledge (default) or Dups-ok-acknowledge.
A message select to filter the messages the MDB receives.
javax.jms.Queue or javax.jms.Topic.
Applies only to destinationType=" javax.jms.Topic". Values are either Durable
or NonDurable (default).
Sets the client identifier used when connecting to the JMS provider.
Applies only to destinationType=" javax.jms.Topic". The name of the durable
or non-durable subscription.
It's important to remember that these configuration properties are defined in the JMS 2.0
specification for consuming JMS messages. If your MDB is going to consume different
kinds of messages, the activation configuration properties will be specific for that provider
and may not share any similarity to these configuration properties. Next, we're going to
look at some of these additional activation configuration properties in more detail.
Acknowledgment mode
Messages aren't actually removed from the underlying JMS queue until the consumer
acknowledges them. There are many “modes” through which messages can be acknow-
ledged. By default, the acknowledgement mode for the underlying JMS session is assumed
to be Auto-acknowledge , which means that the session acknowledges messages on
your behalf in the background. This is the case for the example (because you omitted this
property). You could change the acknowledgement mode to Dups-ok-acknowledge
by using the following code:
@ActivationConfigProperty {
Subscription durability
If the MDB is listening on a topic, you can specify whether the topic subscription is durable
or nondurable.
Search WWH ::

Custom Search