如何为 ActiveMQ 配置自定义插件
由于我在邮件列表上没有得到有效的答案,所以我在这里尝试一下。
文档说可以像这样配置您自己的插件:
我在 ActiveMQ 5.5 上尝试了以下方式:
这个配置引发了两个问题: 1. 验证失败。此配置的 xml 验证失败,因为不需要“bean”标签,即使文档另有说明。 2.当我的配置验证被停用时,spring抛出以下异常:
org.springframework.beans.factory.BeanDefinitionStoreException:无法识别的xbean元素映射:命名空间中的bean http://activemq.apache.org/schema/core
我如何为 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题是缺少名称空间。文档中的示例显示了我所描述的插件标签。实际上,bean 标签必须包含要被识别的 spring 命名空间。
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.
对于那些缺少信息并需要确切答案的人
For those who were missing the information and needed the exact answer