Wir möchten eine EAR bereitstellen, die Message Driven Beans mit JBoss CLI enthält. Für jede Umgebung gibt es verschiedene Aktivierungskonfigurationseigenschaftswerte.Ändern der Aktivierungskonfigurationseigenschaft bei der Bereitstellung über JBoss CLI
Unsere Frage: Ist es möglich, die Werte der Aktivierungskonfigurationseigenschaften nach der Bereitstellung der EAR mit JBoss CLI zu ändern?
Wir wissen, wir könnten property substitution verwenden. Dies scheint jedoch die Aktivierungseigenschaften beim Serverstart festzulegen. Im Gegensatz dazu möchten wir die Werte jederzeit ändern (möglicherweise solange die Anwendung deaktiviert ist).
In 2011 gab es eine similar question. Die Antwort könnte heute veraltet sein. Es schlägt eine Lösung zur Erstellungszeit vor. Das haben wir jetzt und was soll verbessert werden.
Hintergrund: Die MDBS werden von einem IBM Websphere MQ-Ressourcenadapter aktiviert. Der Deskriptor ejb-jar.xml
enthält Schnipsel wie die folgenden:
<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>
Ich fürchte, ich habe keinen Zugriff auf die zweite Ressource. Ich werde jedoch einen Freund bitten, das zu überprüfen. Danke für den Tipp. Die erste Ressource hat einen Kommentar "Das ist eine Konfiguration der Implementierungszeit, die zur Laufzeit nicht geändert werden kann". Brauche ich AOP als Voraussetzung für den zweiten Link? – Claude
@Claude, leider habe ich auch keinen Zugriff auf den Link, aber ich würde Sie ermutigen, googlen. Dieser Link könnte auch hilfreich für Sie sein: http://stackoverflow.com/a/34926075/1925356 –