Java Reference
In-Depth Information
"javax.jms.Queue"),
@ActivationConfigProperty(propertyName =
"destination", propertyValue = "java:jboss/jms/
queue/ticketQueue"),
@ActivationConfigProperty(propertyName =
"messageSelector", propertyValue = "priority =
'HIGH'"),
@ActivationConfigProperty(propertyName =
"acknowledgeMode", propertyValue =
"Auto-acknowledge") })
public class MDBHighPriorityService implements
MessageListener {
. . . . .
}
At the same time, you can deploy another MDB that is in charge of consuming mes-
sages which are sent with a LOW priority:
@MessageDriven(name = "MDBService",
activationConfig = {
@ActivationConfigProperty(propertyName =
"destinationType", propertyValue =
"javax.jms.Queue"),
@ActivationConfigProperty(propertyName =
"destination", propertyValue = "java:jboss/jms/
queue/ticketQueue"),
@ActivationConfigProperty(propertyName =
"messageSelector", propertyValue = "priority =
'LOW'"),
@ActivationConfigProperty(propertyName =
"acknowledgeMode", propertyValue =
"Auto-acknowledge") })
public class MDBLowPriorityService implements
MessageListener {
Search WWH ::




Custom Search