From 7a06b4dfdac34d86c5e72a7b3398b0aa4a489cfb Mon Sep 17 00:00:00 2001 From: Emmanuel Hugonnet Date: Thu, 29 Aug 2024 11:40:44 +0200 Subject: [PATCH] [WFLY-19651]: Restore configuration CLI commands produce a warning messages for remote-helloworld-mdb QS. * Adding the server with all it required in a batch. Jira: https://issues.redhat.com/browse/WFLY-19651 Signed-off-by: Emmanuel Hugonnet --- .../configure-remote-broker.cli | 3 +- .../remove-remote-broker.cli | 29 +++++-------------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/remote-helloworld-mdb/configure-remote-broker.cli b/remote-helloworld-mdb/configure-remote-broker.cli index ee0a399f0d..fc4eafdc47 100644 --- a/remote-helloworld-mdb/configure-remote-broker.cli +++ b/remote-helloworld-mdb/configure-remote-broker.cli @@ -10,4 +10,5 @@ echo Adding configuration to connect to remote broker # Ensure that the resource adapter to the remote broker is used by default by EJBs /subsystem=ejb3:write-attribute(name=default-resource-adapter-name, value=RemoteConnectionFactory) # Ensure that the default resource adapter used for JMS is the resource adapter to the remote broker -/subsystem=ee/service=default-bindings:write-attribute(name=jms-connection-factory, value=java:jboss/RemoteConnectionFactory) \ No newline at end of file +/subsystem=ee/service=default-bindings:write-attribute(name=jms-connection-factory, value=java:jboss/RemoteConnectionFactory) +reload \ No newline at end of file diff --git a/remote-helloworld-mdb/remove-remote-broker.cli b/remote-helloworld-mdb/remove-remote-broker.cli index f83c01ed19..b7cc8e3fad 100644 --- a/remote-helloworld-mdb/remove-remote-broker.cli +++ b/remote-helloworld-mdb/remove-remote-broker.cli @@ -1,42 +1,27 @@ echo Restore default internal broker configuration and remove remote broker connection - +#Remove configuration changes /subsystem=messaging-activemq/pooled-connection-factory=RemoteConnectionFactory:remove - /subsystem=messaging-activemq/remote-connector=artemis:remove - +#Add server +batch /subsystem=messaging-activemq/server=default:add(elytron-domain=ApplicationDomain, statistics-enabled="${wildfly.messaging-activemq.statistics-enabled:${wildfly.statistics-enabled:false}}") - +/subsystem=messaging-activemq/server=default/jms-queue=ExpiryQueue:add(entries=["java:/jms/queue/ExpiryQueue"]) +/subsystem=messaging-activemq/server=default/jms-queue=DLQ:add(entries=["java:/jms/queue/DLQ"]) /subsystem=messaging-activemq/server=default/address-setting=#:add(dead-letter-address="jms.queue.DLQ", expiry-address="jms.queue.ExpiryQueue", max-size-bytes=10485760, page-size-bytes=2097152, message-counter-history-day-limit=10) - /subsystem=messaging-activemq/server=default/security-setting=#:add() - /subsystem=messaging-activemq/server=default/security-setting=#/role=guest:add(send, consume, create-non-durable-queue, delete-non-durable-queue) - +run-batch /subsystem=messaging-activemq/server=default/http-connector=http-connector:add(socket-binding=http, endpoint=http-acceptor) - /subsystem=messaging-activemq/server=default/http-connector=http-connector-throughput:add(socket-binding=http, endpoint=http-acceptor-throughput, params={batch-delay=50} - /subsystem=messaging-activemq/server=default/in-vm-connector=in-vm:add(server-id=0, params={buffer-pooling=false} - /subsystem=messaging-activemq/server=default/http-acceptor=http-acceptor:add(http-listener=default) - /subsystem=messaging-activemq/server=default/http-acceptor=http-acceptor-throughput:add(http-listener=default, params={batch-delay=50, direct-deliver=false}) - /subsystem=messaging-activemq/server=default/in-vm-acceptor=in-vm:add(server-id=0, params={buffer-pooling=false} - -/subsystem=messaging-activemq/server=default/jms-queue=ExpiryQueue:add(entries=["java:/jms/queue/ExpiryQueue"]) - - -/subsystem=messaging-activemq/server=default/jms-queue=DLQ:add(entries=["java:/jms/queue/DLQ"]) - /subsystem=messaging-activemq/server=default/connection-factory=InVmConnectionFactory:add(connectors=[in-vm], entries=["java:/ConnectionFactory"]) - /subsystem=messaging-activemq/server=default/connection-factory=RemoteConnectionFactory:add(connectors=[http-connector], entries=["java:jboss/exported/jms/RemoteConnectionFactory"]) - /subsystem=messaging-activemq/server=default/pooled-connection-factory=activemq-ra:add(transaction=xa, connectors=[in-vm], entries=["java:/JmsXA","java:jboss/DefaultJMSConnectionFactory"]) - /subsystem=ejb3:write-attribute(name=default-resource-adapter-name, value=${ejb.resource-adapter-name:activemq-ra.rar}) - /subsystem=ee/service=default-bindings:write-attribute(name=jms-connection-factory, value=java:jboss/DefaultJMSConnectionFactory) +#Remove added socket binding /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=remote-artemis:remove() \ No newline at end of file