activeMQ Mysql静态话
来源:互联网 发布:js cookie大小 编辑:程序博客网 时间:2024/05/19 14:36
在activemq.xml文件中找到<persistenceAdapter>
节点,修改如下:
<persistenceAdapter> <jdbcPersistenceAdapter dataSource="#MySQL-DS" createTablesOnStartup="false"/></persistenceAdapter><!--createTablesOnStartup第一次启动时设置成true,然后设置成false后面就不需要每次启动都去建表了.-->
MySQL-DS的定义:
<!--在配置文件中的broker节点外增加如下内容--><bean id="MySQL-DS" class="com.alibaba.druid.pool.DruidDataSource" destroy-method="close"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql://x.x.x.x:3306/xxxx?relaxAutoCommit=true"/> <property name="username" value="xxxx"/> <property name="password" value="xxxx"/> <property name="poolPreparedStatements" value="true"/> </bean>
最后把mysql-connector-java.jar、druid.jar拷贝到lib文件夹下,再新建数据库就可以了.
activemq默认是不需要密码的,不管生产还是消费都可以直接连接,如果如果加入验证需要在activemq.xml中添加plugins节点内容如下:
<plugins> <!-- Configure authentication; Username, passwords and groups --> <simpleAuthenticationPlugin> <users> <authenticationUser username="${activemq.username}" password="${activemq.password}" groups="users,admins"/> </users> </simpleAuthenticationPlugin></plugins>
这样就可以验证了,用户名和密码在activemq/conf/credentials.properties中配置
0 0
- activeMQ Mysql静态话
- ActiveMQ静态发现集群
- activeMQ静态链接
- ActiveMQ纯静态路由配置
- activemq链接mysql
- activemq配置mysql
- ActiveMQ(3)-ActiveMQ+MySQL持久化
- Spring+ActiveMQ+Mysql 配置JMS
- activemq与mysql持久化
- Spring+ActiveMQ+Mysql 配置JMS
- activeMQ的Mysql持久设置
- activeMQ持久化mysql配置
- Tomcat Spring ActiveMQ MySQL JMX Integration
- Apache ActiveMQ 持久化到MySQL数据库
- activemq spring mysql实现持久化
- ActiveMQ消息持久化到Mysql数据库
- Activemq实现Mysql与SolrCloud同步策略
- ActiveMQ
- Effective C++ 部分读书笔记
- 选择排序
- Hbuilder支持jquery、zepto、angular、ext、dojo 等js框架的提示吗
- HDU 2612 Find a way (广搜,队列)
- 各种排序算法
- activeMQ Mysql静态话
- iTunes connect 上传app遇到的问题 联系官方大全
- linux文件传输命令:SCP用法
- LeetCode(java)9. Palindrome Number
- Your project path contains non-ASCII characters(使用androidstudio常见错误)
- live555—VS2010/VS2013 下live555编译、使用及测试
- ASP.net和EasyUI后台管理系统
- 集群和分布式的区别
- HashMap