Java Reference
In-Depth Information
Activation configuration
property
Valid values
Description
subscriptionDurability
NON_DURABLE or
DURABLE
This specifies whether a
subscription is durable
or nondurable. Durable
subscriptions survive an
application server restart
or crash and they are only
used for JMS topics (pub/
sub messaging domain).
subscriptionName
Free form
This sets the subscription
name for durable
subscriptions.
For our example, we simply need to accept all of the default values and click on the
Finish button. The following code shows the generated message-driven bean:
package com.ensode.jmsintro;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.jms.Message;
import javax.jms.MessageListener;
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName =
"destinationLookup", propertyValue = "jms/myQueue"),
@ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Queue")
})
public class MessageReceiver implements MessageListener {
public MessageReceiver() {
}
@Override
public void onMessage(Message message) {
}
}
Search WWH ::




Custom Search