1. Put in your activemq.xml under the WEB-INF folder. Your ActiveMQ distribution(5.1.0 at time of this article) has this config file under the "conf" folder. We will not discuss configuring it here. Go here to read about configuring
2. The lib folder of the distribution has all possible jars that JMS may ever need in its lifetime. If you are not using Maven, you may need to copy the jars to your classpath. If you are using Maven, these dependencies should generally suffice for basic use.
<dependency>3. Put this bean definition in your spring conf:
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>2.5.5</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.3.1.4</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>5.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-web</artifactId>
<version>5.1.0</version>
</dependency>
Go here if you wish to simply run ActiveMQ using Maven
<bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">You should be good to go. Bringing up your Spring application will start the broker at tcp://localhost:61636
<property name="config" value="/WEB-INF/activemq.xml"/>
<property name="start" value="true"/>
</bean>
2 comments:
Note that the activemq.xml is a regular spring XML file - so you can just copy the XML into your spring XML as well
Agreed. Just keeping things separated for simplicity :)
Post a Comment