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 mjanveaux wrote: > > 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... >> http://www.nabble.com/file/7936/activemq.xml 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 >> > > -- View this message in context: http://www.nabble.com/Failing-to-acquire-exclusive-lock---MySQL-tf3598830s2354.html#a10191598 Sent from the ActiveMQ - User mailing list archive at Nabble.com.