Using the any deployment package or fix pack, install the ActiveMQ component on two cluster nodes. Then follow the steps below:
- Stop ActiveMQ on each of the two environments where brokers are located using the command
./stop.sh mq
. - Update the activemq.xml configuration files for Broker 1 and Broker 2. Refer to the Broker 1 configuration: activemq.xml and Broker 2 configuration: activemq.xml files below.
- Refer to the sample jndi.properties (for ActiveMQ broker cluster config) file to make changes in the jndi.properties file located in /opt/nastel/AutoPilotM6/jkool/config/jndi.properties. (See also the activemq-static-transport broker configuration sample.)
- Refer to the sample server.xml (for ActiveMQ broker cluster config) file to make changes in Apache tomcat server.xml. (See also the activemq-static-transport broker config sample.)
- Make sure that the java.naming.provider.url in the jndi.properties file matches the brokerURL in server.xml.
- Start both of the brokers using the command
./start.sh mq
.
For the two-node ActiveMQ cluster configuration, add the following in the activemq.xml <networkConnectors> XML Element for only one of the brokers— either broker1 or broker2, but not both. And host/ipad is the host/ipad of other broker.
<networkConnectors>
<networkConnector uri="static:(tcp://<activeMQBRK1>:61616)" duplex="true"/>
</networkConnectors>
File Samples
Broker 1 configuration: activemq.xml
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- START SNIPPET: example -->
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.conf}/credentials.properties</value>
</property>
</bean>
<!--
The <broker> element is used to configure the ActiveMQ broker.
-->
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="Broker1" dataDirectory="${activemq.data}" schedulePeriodForDestinationPurge="300000">
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" >
<!-- The constantPendingMessageLimitStrategy is used to prevent
slow topic consumers to block producers and affect other consumers
by limiting the number of messages that are retained
For more information, see:
http://activemq.apache.org/slow-consumer-handling.html
-->
<pendingMessageLimitStrategy>
<constantPendingMessageLimitStrategy limit="1000"/>
</pendingMessageLimitStrategy>
</policyEntry>
<!-- Delete jKool client result queues that are no longer used (inactive for 2 minutes)
-->
<policyEntry queue="jkool.client.>" gcInactiveDestinations="true" inactiveTimoutBeforeGC="120000" sendAdvisoryIfNoConsumers="true"/>
</policyEntries>
</policyMap>
</destinationPolicy>
<!--
The managementContext is used to configure how ActiveMQ is exposed in
JMX. By default, ActiveMQ uses the MBean server that is started by
the JVM. For more information, see:
http://activemq.apache.org/jmx.html
-->
<managementContext>
<managementContext createConnector="false"/>
</managementContext>
<!--
The store and forward broker networks ActiveMQ will listen to.
We'll leave it empty as duplex network will be configured by another broker
-->
<networkConnectors>
</networkConnectors>
<!--
Configure message persistence for the broker. The default persistence
mechanism is the KahaDB store (identified by the kahaDB tag).
For more information, see:
http://activemq.apache.org/persistence.html
-->
<persistenceAdapter>
<kahaDB directory="${activemq.data}/kahadb"/>
</persistenceAdapter>
<!--
The systemUsage controls the maximum amount of space the broker will
use before disabling caching and/or slowing down producers. For more information, see:
http://activemq.apache.org/producer-flow-control.html
-->
<systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage percentOfJvmHeap="70" />
</memoryUsage>
<storeUsage>
<storeUsage limit="100 gb"/>
</storeUsage>
<tempUsage>
<tempUsage limit="50 gb"/>
</tempUsage>
</systemUsage>
</systemUsage>
<!--
The transport connectors expose ActiveMQ over a given protocol to
clients and other brokers. For more information, see:
http://activemq.apache.org/configuring-transports.html
-->
<transportConnectors>
<!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
<!--transportConnector name="openwire" uri="tcp://0.0.0.0:61617?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/-->
<transportConnector name="openwire" uri="tcp://0.0.0.0:61617?maximumConnections=1000&wireFormat.maxFrameSize=104857600&wireFormat.maxInactivityDuration=0"/>
<transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
</transportConnectors>
<!-- destroy the spring context on shutdown to stop jetty -->
<shutdownHooks>
<bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
</shutdownHooks>
</broker>
<!--
Enable web consoles, REST and Ajax APIs and demos
The web consoles requires by default login, you can disable this in the jetty.xml file
Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
-->
<import resource="jetty.xml"/>
/beans>
<!-- END SNIPPET: example -->
Broker 2 configuration: activemq.xml
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- START SNIPPET: example -->
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.conf}/credentials.properties</value>
</property>
</bean>
<!--
The <broker> element is used to configure the ActiveMQ broker.
-->
<!--broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}"-->
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="Broker2" dataDirectory="${activemq.data}" schedulePeriodForDestinationPurge="300000">
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" >
<!-- The constantPendingMessageLimitStrategy is used to prevent
slow topic consumers to block producers and affect other consumers
by limiting the number of messages that are retained
For more information, see:
http://activemq.apache.org/slow-consumer-handling.html
-->
<pendingMessageLimitStrategy>
<constantPendingMessageLimitStrategy limit="1000"/>
</pendingMessageLimitStrategy>
</policyEntry>
<!-- Delete jKool client result queues that are no longer used (inactive for 2 minutes)
-->
<policyEntry queue="jkool.client.>" gcInactiveDestinations="true" inactiveTimoutBeforeGC="120000" sendAdvisoryIfNoConsumers="true"/>
</policyEntries>
</policyMap>
</destinationPolicy>
<!--
The managementContext is used to configure how ActiveMQ is exposed in
JMX. By default, ActiveMQ uses the MBean server that is started by
the JVM. For more information, see:
http://activemq.apache.org/jmx.html
-->
<managementContext>
<managementContext createConnector="false"/>
</managementContext>
<!--
The store and forward broker networks ActiveMQ will listen to
Create a duplex connector to the first broker
For two node AcitveMQ cluster config need to add following in the <networkConnectors> for only one of the brokers, either broker1 or broker2, but not both. And host/ipad is the host/ipad of other broker.
-->
<networkConnectors>
<networkConnector uri="static:(tcp://<activeMQBRK1>)" duplex="true"/>
</networkConnectors>
<!--
Configure message persistence for the broker. The default persistence
mechanism is the KahaDB store (identified by the kahaDB tag).
For more information, see:
http://activemq.apache.org/persistence.html
-->
<persistenceAdapter>
<kahaDB directory="${activemq.data}/kahadb"/>
</persistenceAdapter>
<!--
The systemUsage controls the maximum amount of space the broker will
use before disabling caching and/or slowing down producers. For more information, see:
http://activemq.apache.org/producer-flow-control.html
-->
<systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage percentOfJvmHeap="70" />
</memoryUsage>
<storeUsage>
<storeUsage limit="100 gb"/>
</storeUsage>
<tempUsage>
<tempUsage limit="50 gb"/>
</tempUsage>
</systemUsage>
</systemUsage>
<!--
The transport connectors expose ActiveMQ over a given protocol to
clients and other brokers. For more information, see:
http://activemq.apache.org/configuring-transports.html
-->
<transportConnectors>
<!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
<!--transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/-->
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600&wireFormat.maxInactivityDuration=0"/>
<transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
</transportConnectors>
<!-- destroy the spring context on shutdown to stop jetty -->
<shutdownHooks>
<bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
</shutdownHooks>
</broker>
<!--
Enable web consoles, REST and Ajax APIs and demos
The web consoles requires by default login, you can disable this in the jetty.xml file
Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
-->
<import resource="jetty.xml"/>
/beans>
<!-- END SNIPPET: example -->
jndi.properties (for ActiveMQ broker cluster config)
# Service is using ActiveMQ to communicate w/ Clients
java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
# Connection url to ActiveMQ broker
#java.naming.provider.url = tcp://${jkool.service.conn.str:localhost:61616}?jms.prefetchPolicy.all=256&wireFormat.maxInactivityDuration=0
#java.naming.provider.url = failover:(tcp://<activeMQBRK1>,tcp://<activeMQBRK2>)?jms.prefetchPolicy.all=256&wireFormat.maxInactivityDuration=0
java.naming.provider.url = failover:(tcp://<activeMQBRK1>,tcp://<activeMQBRK2>)?randomize=false&timeout=10000&nested.connectionTimeout=120000&nested.wireFormat.maxInactivityDuration=300000&nested.wireFormat.maxInactivityDurationInitalDelay=60000
# Fatpipes4J JMS connection factory
connectionFactoryNames = FPConnectionFactory, connectionFactory
# Queues
queue.admin-requests = jkool.service.admin.requests
queue.client-requests = jkool.service.requests
queue.jkadminreq-to-query = jksvc.to.jkadmreq.to.query
queue.jkql-to-exe = jksvc.to.jkql.to.exec
queue.jkreq-to-query = jksvc.to.jkreq.to.query
queue.jkreq-to-sub-grid = jksvc.jkreq.to.subgrid
queue.ml-predict-req = jksvc.ml.predict.req
queue.ml-predict-resp = jksvc.ml.predict.resp
queue.ml-query-req = jksvc.ml.query.req
queue.ml-query-resp = jksvc.ml.query.resp
queue.ml-train-req = jksvc.ml.train.req
queue.ml-train-resp = jksvc.ml.train.resp
queue.raw-tnt4j-data = jksvc.stream.data
queue.result-to-router = jksvc.result.to.router
queue.status-results = jksvc.status.results
queue.sub-data-to-real-time = jksvc.sub.data.to.realtime
queue.sub-req-to-real-time = jksvc.sub.req.to.realtime
queue.sub-result-to-handler = jksvc.sub.res.to.handler
queue.sub-status-data = jksvc.sub.status.data
queue.to-activity-analyzer = jksvc.to.act.analyzer
queue.to-activity-cleanser = jksvc.to.act.cleanser
queue.to-activity-stitcher = jksvc.to.act.stitcher
queue.to-analytic-grid = jksvc.to.analytic.grid
queue.to-compute-handler = jksvc.to.compute.handler
queue.to-compute-stager = jksvc.to.compute.stager
queue.to-def-exporter = jksvc.to.def.exporter
queue.to-jkql-scheduler = jksvc.to.jkql.scheduler
queue.to-log-writer = jksvc.to.log.writer
queue.to-model-trainer = jksvc.to.model.trainer
queue.to-sched-jkql-handler = jksvc.to.sched.jkql.handler
queue.to-sched-jkql-res-handler = jksvc.to.sched.jkql.res.handler
queue.to-script-handler = jksvc.to.script.handler
queue.to-source-updater = jksvc.to.source.updater
queue.to-stitching-stager = jksvc.to.stitching.stager
queue.to-update-stager = jksvc.to.update.stager
queue.trig-data-to-real-time = jksvc.trig.data.to.realtime
queue.trig-def-to-real-time = jksvc.trig.def.to.realtime
queue.trig-req-to-handler = jksvc.trig.req.to.handler
queue.trig-result-to-handler = jksvc.trig.res.to.handler
queue.trig-status-data = jksvc.trig.status.data
queue.trig-status-result = jksvc.trig.status.results
queue.update-requests = jkool.service.update.requests
#Topics
topic.item-update-requests = jksvc.item.upd.requests
topic.published-metrics = jksvc.metrics
topic.status-requests = jkool.service.status.requests
topic.subscription-metrics = jksvc.sub.metrics
topic.to-item-updater = jksvc.to.item.updater
topic.trigger-metrics = jksvc.trigger.metrics
server.xml (for ActiveMQ broker cluster config)
In the meshIQ Platform versions 11 and later, xray.war and jkool-service.war have been renamed to track.war and ds-api.war, respectively.
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="8005" shutdown="1qazxsw23wsxzsawq32132321qwwedsa234e">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<!-- Security listener. Documentation at /docs/config/listeners.html
<Listener className="org.apache.catalina.security.SecurityListener" />
-->
<!-- APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- TO Enable SSL connetion: -->
<!--
<Connector
protocol="org.apache.coyote.http11.Http11NioProtocol"
port="8443" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="/opt/nastel/AutoPilotM6/ssl/your.jks" keystorePass="password"
clientAuth="false" SSLProtocol="TLSv1.2"
/>
-->
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443
This connector uses the NIO implementation. The default
SSLImplementation will depend on the presence of the APR/native
library and the useOpenSSL attribute of the
AprLifecycleListener.
Either JSSE or OpenSSL style configuration may be used regardless of
the SSLImplementation selected. JSSE style configuration is used below.
-->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
type="RSA" />
</SSLHostConfig>
</Connector>
-->
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
This connector uses the APR/native implementation which always uses
OpenSSL for TLS.
Either JSSE or OpenSSL style configuration may be used. OpenSSL style
configuration is used below.
-->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
maxThreads="150" SSLEnabled="true" >
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
<SSLHostConfig>
<Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
certificateFile="conf/localhost-rsa-cert.pem"
certificateChainFile="conf/localhost-rsa-chain.pem"
type="RSA" />
</SSLHostConfig>
</Connector>
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<!--
<Connector protocol="AJP/1.3"
address="::1"
port="8009"
redirectPort="8443" />
-->
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="/xray"
reloadable="true"
docBase="xray.war">
<!-- Client is using ActiveMQ to communicate w/ jKool Service -->
<!-- The brokerURL host name or IP address should be that of the jKool Service (which is hosting ActiveMQ broker) -->
<Resource name="jms/FPConnectionFactory"
auth="Container"
type="org.apache.activemq.ActiveMQConnectionFactory"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
brokerURL="failover:(tcp://<activeMQBRK1>,tcp://<activeMQBRK2>)?randomize=false&timeout=10000&nested.connectionTimeout=120000&nested.wireFormat.maxInactivityDuration=300000&nested.wireFormat.maxInactivityDurationInitalDelay=60000"/>
<!-- ActiveMQ queue on which to send requests - physicalName must match definition on jKool Service -->
<Resource name="jms/queue/client-requests"
auth="Container"
type="org.apache.activemq.command.ActiveMQQueue"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
physicalName="jkool.service.requests"/>
<!-- ActiveMQ queue on which to send admin requests - physicalName must match definition on jKool Service -->
<Resource name="jms/queue/admin-requests"
auth="Container"
type="org.apache.activemq.command.ActiveMQQueue"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
physicalName="jkool.service.admin.requests"/>
<!-- ActiveMQ queue on which to send update requests - physicalName must match definition on jKool Service -->
<Resource name="jms/queue/update-requests"
auth="Container"
type="org.apache.activemq.command.ActiveMQQueue"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
physicalName="jkool.service.update.requests"/>
<!-- ActiveMQ topic on which to send status requests - physicalName must match definition on jKool Service -->
<Resource name="jms/topic/status-requests"
auth="Container"
type="org.apache.activemq.command.ActiveMQTopic"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
physicalName="jkool.service.status.requests"/>
</Context>
<Context path="/jkool-service"
reloadable="true"
docBase="jkool-service.war">
<!-- Client is using ActiveMQ to communicate w/ jKool Service -->
<!-- The brokerURL host name or IP address should be that of the jKool Service (which is hosting ActiveMQ broker) -->
<Resource name="jms/FPConnectionFactory"
auth="Container"
type="org.apache.activemq.ActiveMQConnectionFactory"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
brokerURL="failover:(tcp://<activeMQBRK1>,tcp://<activeMQBRK2>)?randomize=false&timeout=10000&nested.connectionTimeout=120000&nested.wireFormat.maxInactivityDuration=300000&nested.wireFormat.maxInactivityDurationInitalDelay=60000"/>
<!-- ActiveMQ queue on which to send requests - physicalName must match definition on jKool Service -->
<Resource name="jms/queue/client-requests"
auth="Container"
type="org.apache.activemq.command.ActiveMQQueue"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
physicalName="jkool.service.requests"/>
<!-- ActiveMQ queue on which to send admin requests - physicalName must match definition on jKool Service -->
<Resource name="jms/queue/admin-requests"
auth="Container"
type="org.apache.activemq.command.ActiveMQQueue"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
physicalName="jkool.service.admin.requests"/>
<!-- ActiveMQ queue on which to send update requests - physicalName must match definition on jKool Service -->
<Resource name="jms/queue/update-requests"
auth="Container"
type="org.apache.activemq.command.ActiveMQQueue"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
physicalName="jkool.service.update.requests"/>
<!-- ActiveMQ topic on which to send status requests - physicalName must match definition on jKool Service -->
<Resource name="jms/topic/status-requests"
auth="Container"
type="org.apache.activemq.command.ActiveMQTopic"
factory="org.apache.activemq.jndi.JNDIReferenceFactory"
physicalName="jkool.service.status.requests"/>
</Context>
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
</Engine>
</Service>
</Server>