title: Database activemq-data\localhost\KahaDB\lock is locked... waiting 10 seconds for the database to be unlocked
body: <p>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:</p>
  
  <p>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.</p>
  
  <p>If I stop the application server that acts as jms, the error message disappears.
  How can I solve this problem?</p>