Message-driven bean deployment descriptor attributes

Transaction type

This attribute determines whether the message-driven bean manages its own transactions, or whether the container manages transactions on behalf of the bean.

Bean
The message-driven bean manages its own transactions.
Container
The container manages transactions on behalf of the bean.

Message selector

This attribute determines the JMS message selector that is used to select which messages the message bean receives.

For example:
JMSType='car' AND color='blue' AND weight>2500

The selector string can refer to fields in the JMS message header and fields in the message properties. Message selectors cannot reference message body values.

Acknowledge mode

This attribute determines how the session acknowledges any messages it receives. This attribute applies only to message-driven beans that use bean-managed transaction demarcation (Transaction type is set to Bean).

Auto Acknowledge
The session automatically acknowledges delivery of each message.
Dups OK Acknowledge
The session lazily acknowledges the delivery of messages. This setting is likely to result in the delivery of some duplicate messages if JMS fails, so it should be used only by consumer applications that are tolerant of duplicate messages.

As defined in the EJB specification, clients cannot use the Message.acknowledge() method to acknowledge messages. If a value of CLIENT_ACKNOWLEDGE is passed on the createxxxSession call, then messages are automatically acknowledged by the application server and the Message.acknowledge() method is not used.

Note:

The acknowledgement is sent when the message is deleted.

If you have a non-transactional message-driven bean, the system either deletes the message when the bean starts, or when the bean completes. If the bean generates an exception, and therefore does not complete, the system takes one of the following actions:
  • If the system is configured to delete the message when the bean completes, then the message is despatched to a new instance of the bean, so the message has another opportunity to be processed.
  • If the system is configured to delete the message when the bean starts, then the message is lost.

The message is deleted when the bean starts if the quality of service is set to Best effort nonpersistent. For all other qualities of service, the message is deleted when the bean completes.

Destination type

This attribute determines whether the message bean uses a queue or topic destination.

Queue
The message bean uses a queue destination.
Topic
The message bean uses a topic destination.

Subscription durability

This attribute determines whether a JMS topic subscription is durable or nondurable.

Durable
A subscriber registers a durable subscription with a unique identity that is retained by JMS. Subsequent subscriber objects with the same identity resume the subscription in the state it was left in by the earlier subscriber. If there is no active subscriber for a durable subscription, JMS retains the subscription messages until they are received by the subscription or until they expire.
Nondurable
Nondurable subscriptions last for the lifetime of their subscriber object. This means that a client sees the messages published on a topic only while its subscriber is active. If the subscriber is not active, the client is missing messages published on its topic.

A nondurable subscriber can only be used in the same transactional context (for example, a global transaction or an unspecified transaction context) that existed when the subscriber was created. For more information about this context restriction, see Designing an enterprise application to use JMS.

ActivationSpec name

This attribute specifies the JNDI name of the activation specification that is used to deploy this message-driven bean. This name must match the name of an activation specification that you define to WebSphere® Application Server.

Message Linking

Message linking allows the routing of messages to a specific message-driven bean in a deployment. Message linking allows message flow to be orchestrated between components in the same application.

For a message to be consumed and processed by a message-driven bean, the<message-destination-link> element must be defined in the deployment descriptor associated with the message-driven bean. The destination identified by the <message-destination-link> element corresponds to the logical destination.

When the <message-destination-ref> includes a <message-destination-link> element, messages will be consumed at that destination.

In order to get the message-driven bean to consume messages sent to a destination, you can declare a <message-destination-link> element in the deployment descriptor, or alternatively set it in the activation specification.




Related tasks
Administering nodes and resources
EJB 3.0 application bindings overview
Developing an enterprise application to use message-driven beans
Reference topic Reference topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Jun 11, 2013 8:40:09 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=v701sca&product=was-nd-mp&topic=rmb_ddprops
File name: rmb_ddprops.html