tomcat+activemq整合(8)
发布时间:2021-06-05
发布时间:2021-06-05
Tomcat与ActiveMQ的整合文档
<property name="databaseName" value="derbydb"/>
<property name="createDatabase" value="create"/>
</bean>
-->
</beans>
<!-- END SNIPPET: example -->
Tomcat下webapps\aa项目的web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="/xml/ns/j2ee"
xmlns:xsi="/2001/XMLSchema-instance"
xsi:schemaLocation="/xml/ns/j2ee
/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>jms-listener</servlet-name>
<servlet-class>
com.flvcd.servlet.JMSListener
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
编译java命令:
编译JMSListener.java至classes目录:
javac
-cp .;D:\apache-tomcat-6.0.14\lib\servlet-api.jar;D:\apache-tomcat-6.0.14\lib\geronimo-jms_1.1_spec-1.1.1.jar;D:\apache-tomcat-6.0.14\lib\activemq-core-5.1.0.jar -d . JMSListener.java
运行Demo:
启动ActiveMQ服务器
下一篇:三年级上数学北师大文字题