修改配置文件activemq.xml
<persistenceAdapter>
<jdbcPersistonceAdapter dataSource=" tmysql -ds"/>
<!-- <kahaDB directorym"S (activemq.data}/kahadb"/> -- >
</persistenceAdapter>
在broker之后
<beanid="tmysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc .Driver*/>
<property name="ur"value="jdbc:mys/:/localhost:3306/test_ mq?relaxAutoCommit=true"/>
<property name="usermame" value="root/>
<property name="password" value="root"/>
<property name="maxActive" value="200"/>
<property name="poolPreparedStatements" value="true"/>
</bean>
将Mysql驱动粘贴到 lib下
生产者发布消息
执行之后MySQL数据库中多了三张表