# ActiveMQ PooledConnectionFactory ## Prerequisites You must have completed Lab 1 successfully. Each lab builds on the previous lab. Switch to the `router` directory in your Cloud 9 IDE. ``` cd ~/environment/amazon-mq-enterprise-integration-patterns/router ``` ## What are we doing? In this example, we will be integrating AmazonMQ broker endpoints to our skeleton project using a PooledConnectionFactory. In contrast to a ConnectionFactory, connection pooling helps Camel application to share a fixed number of connections thus reducing the load on the AmazonMQ broker and improving connections efficiently. ## Add dependencies Our project depends on various java libraries to run. These dependencies are managed by Maven. Add the following lines to ```pom.xml`` file in the `````` block. ``` org.apache.activemq activemq-camel 5.15.9 org.apache.activemq activemq-all 5.15.9 org.apache.camel camel-jasypt 2.24.2 ``` ## Add ActiveMQ bean with connection pooling. ``` ``` ## Add the pooled routes ``` ``` ## Run the project Now run the skeleton project using the following commands. ``` mvn install mvn camel:run ```