-
1. Re: Wildfly and external activemq-artemis instance
okalman Jul 28, 2017 2:29 AM (in response to angelo.rlcosta)Hi try this:
In broker.xml create new queue
<jms xmlns="urn:activemq:jms">
<queue name="MY_QUEUE"/>
</jms>
Your WF configuration is mostly correct so use it and add
<bindings>
<external-context name="java:global/remoteContext" module="org.apache.activemq.artemis" class="javax.naming.InitialContext">
<environment>
<property name="java.naming.factory.initial" value="org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory"/>
<property name="java.naming.provider.url" value="tcp://127.0.0.1:61616"/>
<property name="queue.MY_QUEUE" value="MY_QUEUE"/>
</environment>
</external-context>
<lookup name="java:/MY_QUEUE" lookup="java:global/remoteContext/MY_QUEUE"/>
</bindings>
You should be able to use your queue via "java:/MY_QUEUE"
Note: there was some backwards compatibility issues which may not be solved on your broker side (i don't know what version do you have), so try to use the latest Artemis borker
-
2. Re: Wildfly and external activemq-artemis instance
angelo.rlcosta Jul 28, 2017 4:46 AM (in response to okalman)Hello,
I have configured the queue in the broker.xml file but now i get an error when i start artemis:
_ _ _
/ \ ____| |_ ___ __ __(_) _____
/ _ \| _ \ __|/ _ \ \/ | |/ __/
/ ___ \ | \/ |_/ __/ |\/| | |\___ \
/_/ \_\| \__\____|_| |_|_|/___ /
Apache ActiveMQ Artemis 2.1.0
09:41:35,943 ERROR [org.apache.activemq.artemis.core.client] AMQ214019: Invalid configuration: org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: Invalid content was found starting with element 'jms'. One of '{"urn:activemq:core":sys
tem-property-prefix, "urn:activemq:core":internal-naming-prefix, "urn:activemq:core":resolve-protocols, "urn:activemq:core":scheduled-thread-pool-max-size, "urn:activemq:core":graceful-shutdown-enabled, "urn:activemq:core":graceful-shutd
own-timeout, "urn:activemq:core":security-enabled, "urn:activemq:core":security-invalidation-interval, "urn:activemq:core":journal-lock-acquisition-timeout, "urn:activemq:core":wild-card-routing-enabled, "urn:activemq:core":management-ad
dress, "urn:activemq:core":management-notification-address, "urn:activemq:core":cluster-user, "urn:activemq:core":cluster-password, "urn:activemq:core":password-codec, "urn:activemq:core":mask-password, "urn:activemq:core":log-delegate-f
actory-class-name, "urn:activemq:core":jmx-management-enabled, "urn:activemq:core":jmx-domain, "urn:activemq:core":jmx-use-broker-name, "urn:activemq:core":message-counter-enabled, "urn:activemq:core":message-counter-sample-period, "urn:
activemq:core":message-counter-max-day-history, "urn:activemq:core":connection-ttl-override, "urn:activemq:core":connection-ttl-check-interval, "urn:activemq:core":configuration-file-refresh-period, "urn:activemq:core":async-connection-e
xecution-enabled, "urn:activemq:core":transaction-timeout, "urn:activemq:core":transaction-timeout-scan-period, "urn:activemq:core":message-expiry-scan-period, "urn:activemq:core":message-expiry-thread-priority, "urn:activemq:core":id-ca
che-size, "urn:activemq:core":persist-id-cache, "urn:activemq:core":remoting-incoming-interceptors, "urn:activemq:core":remoting-outgoing-interceptors, "urn:activemq:core":persist-delivery-count-before-delivery, "urn:activemq:core":popul
ate-validated-user, "urn:activemq:core":connectors, "urn:activemq:core":broadcast-groups, "urn:activemq:core":discovery-groups, "urn:activemq:core":diverts, "urn:activemq:core":queues, "urn:activemq:core":bridges, "urn:activemq:core":ha-
policy, "urn:activemq:core":cluster-connections, "urn:activemq:core":grouping-handler, "urn:activemq:core":create-bindings-dir, "urn:activemq:core":page-max-concurrent-io, "urn:activemq:core":create-journal-dir, "urn:activemq:core":journ
al-buffer-size, "urn:activemq:core":journal-sync-transactional, "urn:activemq:core":journal-sync-non-transactional, "urn:activemq:core":log-journal-write-rate, "urn:activemq:core":journal-file-size, "urn:activemq:core":journal-compact-pe
rcentage, "urn:activemq:core":journal-compact-min-files, "urn:activemq:core":journal-max-io, "urn:activemq:core":server-dump-interval, "urn:activemq:core":global-max-size, "urn:activemq:core":memory-warning-threshold, "urn:activemq:core"
:memory-measure-interval, "urn:activemq:core":store, "urn:activemq:core":security-settings, "urn:activemq:core":broker-plugins, "urn:activemq:core":address-settings, "urn:activemq:core":resource-limit-settings, "urn:activemq:core":connec
tor-services, "urn:activemq:core":addresses, "urn:activemq:core":network-check-list, "urn:activemq:core":network-check-URL-list, "urn:activemq:core":network-check-period, "urn:activemq:core":network-check-timeout, "urn:activemq:core":net
work-check-NIC, "urn:activemq:core":network-check-ping-command, "urn:activemq:core":network-check-ping6-command, "urn:activemq:core":wildcard-addresses}' is expected.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) [rt.jar:1.8.0_66]
What does this mean?
I added the jms queue before <address-settings> tag.
Regarding the binding in which subsystem should i configure it? Can you kindly provide a simple example?
Thanks in advance,
AC
-
3. Re: Wildfly and external activemq-artemis instance
okalman Jul 28, 2017 5:28 AM (in response to angelo.rlcosta)<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
<jms xmlns="urn:activemq:jms">
.
.
.
-
4. Re: Wildfly and external activemq-artemis instance
angelo.rlcosta Jul 28, 2017 9:46 AM (in response to okalman)Thanks that worked!