Java Reference
In-Depth Information
Table 4.1. Activation properties for a JMS provider standardized by the JMS 2.0 spec
Activation property
Description
destinationLookup
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.
connectionFactoryLookup
acknowledgeMode
Auto-acknowledge (default) or Dups-ok-acknowledge.
messageSelector
A message select to filter the messages the MDB receives.
destinationType
javax.jms.Queue or javax.jms.Topic.
Applies only to destinationType=" javax.jms.Topic". Values are either Durable
or NonDurable (default).
subscriptionDurability
clientId
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.
subscriptionName
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 {
propertyName="acknowledgeMode"
propertyValue="Dups-ok-acknowledge"
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