Laures
Laures

Reputation: 5479

How can i configure Custom Plugins for ActiveMQ

Since i didn't get a working answer on the mailinglist i try it here.

The Documentation says its possible to configure your own plugins like that:

<plugins> <bean id="myPlugin" class="org.myorg.MyPlugin"/>
</plugins>

I tried this with on ActiveMQ 5.5 the following way:

<plugins> <jaasAuthenticationPlugin configuration="activemq-domain" /> <bean id="authplug" class="org.apache.activemq.security.AuthorizationPlugin"><property name="map"><bean name="authMap" class="my.authMap" /></property></bean> </plugins>

This config raised two problems: 1. Validation fails. The xml validation fails for this configuration because the "bean"-Tag is not expected, even if the documentation sais otherwise. 2. When validation is deactivated for my config spring throws the following exception:

org.springframework.beans.factory.BeanDefinitionStoreException: Unrecognized xbean element mapping: bean in namespace http://activemq.apache.org/schema/core

How can i configure custom plugins for ActiveMQ?

Upvotes: 1

Views: 1113

Answers (2)

user1889970
user1889970

Reputation: 736

For those who were missing the information and needed the exact answer

 <plugins>
            <jaasAuthenticationPlugin configuration="activemq" />
            <bean id="myBrokerPlugin" class="omsplugin.oms.MyBrokerPlugin" xmlns="http://www.springframework.org/schema/beans">
    </bean>
        </plugins>

Upvotes: 0

Laures
Laures

Reputation: 5479

The Problem was the missing namespace. The examples in the documentation show the plugins tag like i described. In reality the bean tag must include the spring namespace to be recognized.

Upvotes: 2

Related Questions