activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asdfg195 <>
Subject How can I avoid hard coding the remote queue name in @MessageDriven when using resource adapter
Date Tue, 02 May 2017 20:04:05 GMT
I am using an ActiveMQ resource adapter to connect to a remote ActiveMQ queue
on a wildfly server. I have the following code in my jboss-ejb.xml to set up
my resource adapter


This maps to the following MDB

    activationConfig = {
    @ActivationConfigProperty(propertyName = "destination", propertyValue =
    @ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Queue"),
    @ActivationConfigProperty(propertyName = "acknowledgeMode",
propertyValue = "Auto-acknowledge")})
public class MyNotificationMDB implements MessageListener {

This code works, but I do not like having the name of the remote queue hard
coded into my code. I would like to add another layer of bindings so that we
can change the server configuration to change the queue instead of
recompiling and redeploying the code. The only solution I found was to set
an system property in my standalone.xml and add the following to my


I am not a big fan of this solution since we will have many queues and
setting system properties for each will be a difficult maintenance problem.
Are there any alternative ways that will allow me to not hard code the
remote queue name into my MDB?

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message