数据库activemq-data\localhost KahaDB\lock被锁定…等待10秒,等待数据库被解锁

时间:2021-05-03 16:55:55

I have the following problem: I have a web application that invokes a war that contains a jms and each application has its own file context.xml. Both applications run on Tomcat 6 At a time when the web application invokes the application that contains the jms I get the following error message:

我有以下问题:我有一个web应用程序,它调用一个包含jms的war,每个应用程序都有自己的file context.xml。当web应用程序调用包含jms的应用程序时,两个应用程序都运行在Tomcat 6上,我将得到以下错误消息:

Database activemq-data\localhost\KahaDB\lock is locked... waiting 10 seconds for the database to be unlocked. Reason: java.io.IOException: File 'activemq-data\localhost\KahaDB\lock' could not be locked.

数据库activemq-data \ localhost \ KahaDB \锁锁……等待10秒,等待数据库解锁。原因:. io .文件“activemq-data\localhost KahaDB\lock”无法锁定。

If I stop the application server that acts as jms, the error message disappears. How can I solve this problem?

如果我停止充当jms的应用服务器,错误消息将消失。我如何解决这个问题?

1 个解决方案

#1


1  

What you have done is set up two message brokers that point to the same location on disk, and thereby accidentally set up shared-storage master-slave. One broker in the first app will start up fine, while the other will wait until the first one goes down. The usual way to deal with this is to run ActiveMQ outside of Tomcat, and have your applications connect to that.

您所做的是设置两个指向磁盘上相同位置的消息代理,从而意外地设置共享存储主-从。第一个应用程序中的一个代理程序将启动良好,而另一个代理程序将等待第一个应用程序失败。处理这一问题的通常方法是在Tomcat之外运行ActiveMQ,并让您的应用程序连接到它。

#1


1  

What you have done is set up two message brokers that point to the same location on disk, and thereby accidentally set up shared-storage master-slave. One broker in the first app will start up fine, while the other will wait until the first one goes down. The usual way to deal with this is to run ActiveMQ outside of Tomcat, and have your applications connect to that.

您所做的是设置两个指向磁盘上相同位置的消息代理,从而意外地设置共享存储主-从。第一个应用程序中的一个代理程序将启动良好,而另一个代理程序将等待第一个应用程序失败。处理这一问题的通常方法是在Tomcat之外运行ActiveMQ,并让您的应用程序连接到它。