activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davis <>
Subject livelock AMQPersistenceAdapter
Date Mon, 12 Jan 2009 16:48:24 GMT

I have a spring based JAX-RS/Jetty Servlet that also starts an embedded
ActiveMQ broker.

For unit tests, I am using Jetty.  Sometimes an error occurs and Jetty
restarts.  When this happens, I get the following:

11:36:12,136 INFO  [12882632@qtp0-3] broker.BrokerService
( - Using Persistence Adapter:
11:36:12,136 INFO  [12882632@qtp0-3] amq.AMQPersistenceAdapter
( - AMQStore starting using directory:
11:36:12,261 INFO  [12882632@qtp0-3] impl.KahaStore ( -
Kaha Store using data directory activemq\data\kr-store\state
11:36:12,386 INFO  [12882632@qtp0-3] amq.AMQPersistenceAdapter
( - Active data files: [1]
11:36:12,543 INFO  [12882632@qtp0-3] broker.BrokerService
( - ActiveMQ null JMS Message Broker (localhost) is
11:36:12,543 INFO  [12882632@qtp0-3] broker.BrokerService
( - For help or more information please see:
[INFO] Restart completed at Mon Jan 12 11:36:12 EST 2009
11:36:12,777 INFO  [12882632@qtp0-3] impl.KahaStore ( -
Kaha Store using data directory activemq\data\kr-store\data
11:36:12,902 INFO  [12882632@qtp0-3] transport.TransportServerThreadSupport
( - Listening for connections at:
11:36:12,902 INFO  [12882632@qtp0-3] broker.TransportConnector
( - Connector openwire Started
11:36:12,918 INFO  [12882632@qtp0-3] broker.BrokerService
( - ActiveMQ JMS Message Broker (localhost,
ID:AN5885-4253-1231778172605-0:0) started
11:36:14,199 INFO  [32788514@qtp0-4] support.AbstractApplicationContext
( - Refreshing
display name
startup date [Mon Jan 12 11:36:14 EST 2009]; parent:
11:36:14,214 INFO  [32788514@qtp0-4] xml.XmlBeanDefinitionReader
( - Loading XML bean definitions from class
path resource [activemq.xml]
11:36:14,402 INFO  [32788514@qtp0-4] support.AbstractApplicationContext
( - Bean factory for application context
11:36:14,511 INFO  [32788514@qtp0-4] broker.BrokerService
( - Using Persistence Adapter:
11:36:14,511 WARN  [32788514@qtp0-4] amq.AMQPersistenceAdapter
( - Waiting to Lock the Store activemq\data

After the server restart -- AMQPersistenceAdapter is stuck waiting on a lock
-- the lock that it previously obtained and presumably left in a locked
state on the file system.

I'm sure I likely have an anti-pattern here, but what is the recommended way
to fix this?  I'm trying to figure out how to safely bootstrap the embedded
activemq broker when the servlet starts -- as a singleton...and then if an
error occurs in the server, how to safely destroy/restart the broker?  Is
there a recommended way to do this?
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message