配置ActiveMQ插件,不使用ActiveMQ .xml和spring



我想配置一个ActiveMQ代理来使用jaas身份验证插件。我知道这可以使用xml配置完成,使用下面的

<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>

。但恐怕这也需要我把spring的东西带到类路径中,这是我想避免的。代理插件可以通过其他方式启动吗

您可以使用BrokerService从Java代码中启动activemq代理。您可以在各自的对象上调用各种配置方法。请参阅http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html了解更多细节。该站点有一个jaas插件的示例。

最新更新