Is there a way to define an MDB to listen to a queue that is defined within the -ds.xml file, the IBM MQ JCA datasource configuration?
At the moment I'm defining the message listener as follows:
@MessageDriven(mappedName = "Controller", activationConfig = {
@ActivationConfigProperty(propertyName = "messagingType", propertyValue = "javax.jms.MessageListener"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "_QueueName_"),
@ActivationConfigProperty(propertyName = "queueManager", propertyValue = "_QueueManagerName_"),
@ActivationConfigProperty(propertyName = "transportType", propertyValue = "CLIENT"),
@ActivationConfigProperty(propertyName = "channel", propertyValue = "_Channel_"),
@ActivationConfigProperty(propertyName = "hostName", propertyValue = "_Hostname_") })
@ResourceAdapter("wmq.jmsra.rar")
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
@TransactionManagement(TransactionManagementType.CONTAINER)
public class Controller implements MessageListener {
...
}
I am using JBoss EAP 5.1.
I would like to define the queue by the JNDI name instead of defining everything within the class. I haven't been able to find anything about this.