We would like to deploy an EAR containing message driven beans with JBoss CLI. For each environment there are different activation config property values.
Our question: is it possible to change the values of the activation config properties after deploying the EAR with JBoss CLI?
We know we could use property substitution. However this seems to set the activation properties at server startup. In contrast we would like to change the values at any time (maybe as long as application is disabled).
In 2011 there where a similar question. The answer might be outdated today. It suggests a solution at build time. This is what we have now and what is to be improved.
Background: The MDBS are activated by an IBM Websphere MQ resource adapter. The descriptor ejb-jar.xml
contains snippets like the following one:
<message-driven>
<ejb-name>MyMDB</ejb-name>
<ejb-class>com.acme.MyMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>hostName</activation-config-property-name>
<activation-config-property-value>hostName</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>port</activation-config-property-name>
<activation-config-property-value>1415</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>queueManager</activation-config-property-name>
<activation-config-property-value>queueManagerName</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>channel</activation-config-property-name>
<activation-config-property-value>channelName</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>transportType</activation-config-property-name>
<activation-config-property-value>CLIENT</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>useJNDI</activation-config-property-name>
<activation-config-property-value>true</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>java:jboss/queueName</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>