简体   繁体   English

在没有activemq.xml和spring的情况下配置ActiveMQ插件

[英]Configure ActiveMQ plugin without activemq.xml and spring

I want to configure an ActiveMQ broker to use a jaas authentication plugin. 我想将ActiveMQ代理配置为使用jaas身份验证插件。 I know this can be done using xml-configuration using something like below 我知道这可以使用xml-configuration来完成,如下所示

<broker useJmx="false" persistent="false" xmlns="http://activemq.apache.org/schema/core" populateJMSXUserID="true">
    <plugins>
        <!--  use JAAS to authenticate using the login.config file on the classpath to configure JAAS -->
        <jaasAuthenticationPlugin configuration="activemq-domain" />
    </plugins>
</broker>

. But afaik this also requires me to bring spring-stuff to the classpath, something i would like to avoid. 但是afaik这还需要我将spring-stuff带到classpath中,这是我想避免的事情。 Can the broker plugins be started in some other ways 经纪人插件可以通过其他方式启动吗

You can use the BrokerService to start an activemq broker from within Java code. 您可以使用BrokerService从Java代码中启动activemq代理。 You can call a variety of configuration methods on the respective object. 您可以在相应的对象上调用各种配置方法。 See http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html for more detail. 有关更多详细信息,请参见http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html The site has an example for the jaas plugin. 该站点提供了jaas插件的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM