« Return to Thread: Failing to acquire exclusive lock - MySQL

Re: Failing to acquire exclusive lock - MySQL

by Anthrope :: Rate this Message:

Reply to Author | View in Thread

There is a bug in the 4.1.1 release version of DefaultDatabaseLocker.java. The problem is that the result of the execution of the prepared statement to lock the database row is being incorrectly interpreted. This link ought to explain why:

http://java.sun.com/j2se/1.4.2/docs/api/java/sql/PreparedStatement.html#execute()

I fixed and recompiled activemq and am able to use ActiveMQ 4.1.1 with MySQL in Master-Slave configuration quite alright.

Prashanth



Just additional information - this only happens when using mySQL - I tried this using derby and it works fine...
I"m using mysql 5.0.37

mjanveaux wrote:
Hello,

I recently upgraded to ActiveMQ 4.1.1 from 4.0.1  I integrated ActiveMQ into my application using spring but not using the spring jms templates etc... Here's what I have in my spring configuration for my broker:

<bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
    <property name="config"><value>/WEB-INF/activemq.xml</value></property>
    <property name="start"><value>true</value></property>
</bean>

Here's my activemq.xml file...
activemq.xml

My application is now failing to startup with the following messages in the logs over and over:
INFO 17/04/2007 21:27:02 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire the exclusive lock to become the Master broker
DEBUG 17/04/2007 21:27:02 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000 milli(s) before trying again to get the lock...
INFO 17/04/2007 21:27:03 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire the exclusive lock to become the Master broker
DEBUG 17/04/2007 21:27:03 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000 milli(s) before trying again to get the lock...
INFO 17/04/2007 21:27:04 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Attempting to acquire the exclusive lock to become the Master broker
DEBUG 17/04/2007 21:27:04 Main Thread  org.apache.activemq.store.jdbc.DefaultDatabaseLocker - Sleeping for 1000 milli(s) before trying again to get the lock...


Am I missing a setting? Doing something wrong?  If anybody has some insight I'd appreciate this, I didn't have this problem before.

Thank you

Mark

 « Return to Thread: Failing to acquire exclusive lock - MySQL