0

I have an MDB on JBoss eap. What I want is to register queues from my java code. All I could find is using ejb-jar.xml if one donot want to use annotation. So is there any way that I can provide destination and destination type from Java code , like my java code will read from properties file for this. Thanks in advance.

@MessageDriven(messageListenerInterface=MessageListener.class, 
        activationConfig = {
          @ActivationConfigProperty( propertyName = "destinationType", 
                                     propertyValue = "javax.jms.Queue"),
          @ActivationConfigProperty( propertyName = "destination", 
                                     propertyValue ="test_in")
       }
        )
Mohit Bhagat
  • 245
  • 5
  • 14

1 Answers1

0

you can set the MDB's property values from system properties in annotation itself.

Set annotation to-

@ActivationConfigProperty( propertyName = "destination", propertyValue ="${destination.queue.name}")

and define destination.queue.name as system property in jboss standalone.xml -

<system-properties>
        <property name="destination.queue.name" value="xx.xx.xx.xx"/>
</system-properties>

Make sure that property replacement is enabled in server configuration file and MDB will be deployed with the value provided as system property.

user8826113
  • 119
  • 5