Sunday, June 14, 2020

JBOSS 7.3 connect to remote ActiveMQ


  1. Create mododule ActiveMQ
    mkdir -pv $JBOSS_HOME/modules/system/layers/base/org/apache/activemq/main
    cp activemq-all-5.15.9.jar $JBOSS_HOME/modules/system/layers/base/org/apache/activemq/main
    Create module.xml with content below:
    <?xml version="1.0" encoding="UTF-8"?>
    <module xmlns="urn:jboss:module:1.5" name="org.apache.activemq">
       <resources>
            <resource-root path="activemq-all-5.15.9.jar"/>
        </resources>
        <dependencies>
            <module name="javax.api"/>
            <module name="javax.jms.api"/>
        </dependencies>
    </module>
  2. Choose "Configuration -> Naming -> Binding" click Add(external-context)
    Class: javax.naming.InitialContext
    Environment:
    java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
    java.naming.provider.url=tcp://xxxxx:61616
    Module: org.apache.activemq
    Name: java:global/remoteContext
    Binding Type: external-context
  3. Choose "Configuration -> Naming -> Binding" click Add(lookup) for ConnectionFactory, Queue,..
    Binding Type: lookup
    Lookup: java:global/remoteContext/ConnectionFactory

No comments:

Post a Comment

Install and use xorg-server on macOS via Homebrew

  The instructions to install and use xorg-server on macOS via Homebrew: Install Homebrew (if you haven't already): /bin/bash -c ...