activemq设置登录用户名和密码

在activemq服务的根目录下/conf/activemq.xml中有这样一个bean值:

<!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.base}/conf/credentials.properties</value>
</property>
</bean>

 

这个文件/conf/credentials.properties就是密码所在的位置,但是默认情况下是没有使用的,需要增加插件

  1.    <plugins>   
  2.         <simpleAuthenticationPlugin>   
  3.             <users>   
  4.                 <authenticationUser username="${activemq.username}" password="${activemq.password}" groups="users,admins"/>   
  5.             </users>   
  6.         </simpleAuthenticationPlugin>   
  7.     </plugins>   
posted @ 2012-05-21 16:07  lxzh504  阅读(13991)  评论(0编辑  收藏  举报