2018-03-08 15:46:38 -05:00
# Apache Tomcat Support
2017-11-03 22:26:39 -04:00
2018-03-08 15:46:38 -05:00
## Resource Context Client Configuration
2017-11-03 22:26:39 -04:00
Apache ActiveMQ Artemis provides support for configuring the client, in the tomcat resource context.xml of Tomcat container.
This is very similar to the way this is done in ActiveMQ 5.x so anyone migrating should find this familiar.
Please note though the connection url and properties that can be set for ActiveMQ Artemis are different please see [Migration Documentation ](https://activemq.apache.org/artemis/migration/ )
2018-03-08 15:46:38 -05:00
### Example of Connection Factory
```xml
2017-11-03 22:26:39 -04:00
< Context >
...
< Resource name = "jms/ConnectionFactory" auth = "Container" type = "org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory" description = "JMS Connection Factory"
factory="org.apache.activemq.artemis.jndi.JNDIReferenceFactory" brokerURL="tcp://localhost:61616" />
...
< / Context >
````
2018-03-08 15:46:38 -05:00
### Example of Destination (Queue and Topic)
2017-11-03 22:26:39 -04:00
2018-03-08 15:46:38 -05:00
```xml
2017-11-03 22:26:39 -04:00
< Context >
...
< Resource name = "jms/ExampleQueue" auth = "Container" type = "org.apache.activemq.artemis.jms.client.ActiveMQQueue" description = "JMS Queue"
factory="org.apache.activemq.artemis.jndi.JNDIReferenceFactory" address="ExampleQueue" />
...
< Resource name = "jms/ExampleTopic" auth = "Container" type = "org.apache.activemq.artemis.jms.client.ActiveMQTopic" description = "JMS Topic"
factory="org.apache.activemq.artemis.jndi.JNDIReferenceFactory" address="ExampleTopic" />
...
< / Context >
````
2018-03-08 15:46:38 -05:00
## Example Tomcat App
2017-11-03 22:26:39 -04:00
2018-03-08 15:46:38 -05:00
A sample Tomcat app with the container context configured as an example can be seen here:
2017-11-03 22:26:39 -04:00
/examples/features/sub-modules/tomcat