activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcort <>
Subject Slave waiting for lock during JBoss Deployment
Date Mon, 12 Mar 2007 19:34:13 GMT

About my setup:
I'm running ActiveMQ (4.2 Snapshot) on JBoss (4.0.4) with Java (1.5) on
Debian GNU/Linux (stable/sarge). I have 2 JBoss instances and 2 MySQL
(5.0.32) instances. MySQL's database replication is setup and working. I
have ActiveMQ setup in a JDBC Master Slave configuration.

What I want:
I'd like one broker that either JBoss instance can connect to. If the Master
broker goes down, I want the salve to take over as the Master. If possible,
I'd like to create one EAR file that can be deployed on both servers.

What is happening:
It sort of works. I start one JBoss instance and it is happy. I try to start
the second instance and the second instance hangs mid-deployment. The last
message in server.log before it hangs is: "2007-03-12 13:34:57,194 INFO 
[] Database driver
recognized: [mysql-ab_jdbc_driver]". When I shutdown the first instance, the
second instance finishes deploying and is happy.

My Ideas:
>From the log messages, archives I've searched, and documentation I've read,
it looks like the second instance is waiting for the first instance to
release a lock.

The Question:
Is there a way to have the second instance (the slave broker) create a
separate thread that waits for the master to fail so that it doesn't hold up
the deployment of the application? Is there some sort of NOWAIT option? Or
do you have any suggestions for a different strategy?

Here's the broker config. If you need any other information, let me know.
Thank you.

  <broker xmlns="" useJmx="true"
      <usageManager id="memory-manager" limit="50 MB"/>
        <jdbcPersistenceAdapter dataSource="#mysql-ds" />
       <transportConnector name="gateway"
      <networkConnector name="gateway-nc"

  <commandAgent xmlns=""/>

  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
    <property name="url"
    <property name="username" value="username"/>
    <property name="password" value="secret"/>
    <property name="poolPreparedStatements" value="true"/>
    <property name="initialSize" value="5"/>

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message