1

I am starting an active mq broker using my own config file:

./apache-activemq-5.6.0/bin/activemq console xbean:custom-broker.xml

The broker is using some classes I have defined which reside in a jar. For a while now I was just sticking the jar in the activemq lib folder, and everything worked fine. However I would now like for active mq to pick up the jar from a different folder, something which the --extdir option claims to be capable of doing. However I can't get it to work. I am executing the command:

./apache-activemq-5.6.0/bin/activemq console xbean:custom-broker.xml --extdir ../mylib/

where the jar in question is located in mylib, and am getting ClassNotFoundException every time.

What am I missing?

4

1 回答 1

1

解决。--extdir 确实按预期工作,结果有人将其中一个包的名称更改了 1 个字符,这就是为什么 activemq 无法在 jar 中找到有问题的类:P。还值得注意的是,如果您想将多个文件夹添加到活动 mq 的类路径,那么您需要重复 --extdir 多次,如“--extdir foldr1 --extdir foldr2”,如此处所述:

http://activemq.2283324.n4.nabble.com/Is-there-anyway-to-get-activeMQ-to-pick-up-a-jar-at-runtime-other-than-adding-it-to- the-activemqinst-td4654121.html#a4654190

于 2012-07-19T14:58:53.690 回答