Failed to configure custom ActiveMQ broker in TomEE

时间秒杀一切 提交于 2019-12-11 12:42:33

问题


Until now I used the default ActiveMQ configuration in TomEE. Now I would like to turn on scheduler support, so I added these things to tomee.xml:

<Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
    BrokerXmlConfig = broker:(tcp://127.0.0.1:61616)?usekahadb=true&amp;persistent=true&amp;schedulerSupport=true
</Resource>

<Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
    ResourceAdapter = MyJmsResourceAdapter
</Resource>

But I get these error messages:

Database activemq-data/localhost/scheduler/lock is locked... waiting 10 seconds for the database to be unlocked. Reason: java.io.IOException: Failed to create directory 'activemq-data/localhost/scheduler'

Can anyone help me what to do? Every documentation that I found about configuring ActiveMQ inside TomEE is sadly poor, and I cannot figure out how to turn on scheduler support inside TomEE.


回答1:


The problem was that the base directory for ActiveMQ inside TomEE is the TomEE's bin folder and it was not writeable by TomEE so TomEE could not create folders for KahaDB. Making bin writeable for tomee process solved the problem.

After ActiveMQ created necessary folders, I have changed permissions on bin folder back to the original state (for security reason).



来源:https://stackoverflow.com/questions/31190176/failed-to-configure-custom-activemq-broker-in-tomee

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!