Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 90248 invoked from network); 12 Jan 2009 16:48:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jan 2009 16:48:36 -0000 Received: (qmail 84611 invoked by uid 500); 12 Jan 2009 16:48:35 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 84574 invoked by uid 500); 12 Jan 2009 16:48:34 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 84533 invoked by uid 99); 12 Jan 2009 16:48:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jan 2009 08:48:34 -0800 X-ASF-Spam-Status: No, hits=4.8 required=10.0 tests=DNS_FROM_OPENWHOIS,HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jan 2009 16:48:25 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LMPxM-0002XR-HG for users@activemq.apache.org; Mon, 12 Jan 2009 08:48:04 -0800 Message-ID: <21418331.post@talk.nabble.com> Date: Mon, 12 Jan 2009 08:48:04 -0800 (PST) From: davis To: users@activemq.apache.org Subject: livelock AMQPersistenceAdapter MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_37709_16049610.1231778884526" X-Nabble-From: davisford@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_37709_16049610.1231778884526 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 (BrokerService.java:454) - Using Persistence Adapter: AMQPersistenceAdapter(activemq\data) 11:36:12,136 INFO [12882632@qtp0-3] amq.AMQPersistenceAdapter (AMQPersistenceAdapter.java:175) - AMQStore starting using directory: activemq\data 11:36:12,261 INFO [12882632@qtp0-3] impl.KahaStore (KahaStore.java:475) - Kaha Store using data directory activemq\data\kr-store\state 11:36:12,386 INFO [12882632@qtp0-3] amq.AMQPersistenceAdapter (AMQPersistenceAdapter.java:233) - Active data files: [1] 11:36:12,543 INFO [12882632@qtp0-3] broker.BrokerService (BrokerService.java:577) - ActiveMQ null JMS Message Broker (localhost) is starting 11:36:12,543 INFO [12882632@qtp0-3] broker.BrokerService (BrokerService.java:578) - For help or more information please see: http://activemq.apache.org/ [INFO] Restart completed at Mon Jan 12 11:36:12 EST 2009 11:36:12,777 INFO [12882632@qtp0-3] impl.KahaStore (KahaStore.java:475) - Kaha Store using data directory activemq\data\kr-store\data 11:36:12,902 INFO [12882632@qtp0-3] transport.TransportServerThreadSupport (TransportServerThreadSupport.java:72) - Listening for connections at: tcp://AN5885:61616 11:36:12,902 INFO [12882632@qtp0-3] broker.TransportConnector (TransportConnector.java:252) - Connector openwire Started 11:36:12,918 INFO [12882632@qtp0-3] broker.BrokerService (BrokerService.java:488) - ActiveMQ JMS Message Broker (localhost, ID:AN5885-4253-1231778172605-0:0) started 11:36:14,199 INFO [32788514@qtp0-4] support.AbstractApplicationContext (AbstractApplicationContext.java:412) - Refreshing org.apache.xbean.spring.context.ResourceXmlApplicationContext@152d950: display name [org.apache.xbean.spring.context.ResourceXmlApplicationContext@152d950]; startup date [Mon Jan 12 11:36:14 EST 2009]; parent: org.springframework.context.support.ClassPathXmlApplicationContext@f65b5b 11:36:14,214 INFO [32788514@qtp0-4] xml.XmlBeanDefinitionReader (XmlBeanDefinitionReader.java:323) - Loading XML bean definitions from class path resource [activemq.xml] 11:36:14,402 INFO [32788514@qtp0-4] support.AbstractApplicationContext (AbstractApplicationContext.java:427) - Bean factory for application context [org.apache.xbean.spring.context.ResourceXmlApplicationContext@152d950]: org.springframework.beans.factory.support.DefaultListableBeanFactory@92ed85 11:36:14,511 INFO [32788514@qtp0-4] broker.BrokerService (BrokerService.java:454) - Using Persistence Adapter: AMQPersistenceAdapter(activemq\data) 11:36:14,511 WARN [32788514@qtp0-4] amq.AMQPersistenceAdapter (AMQPersistenceAdapter.java:1013) - 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: http://www.nabble.com/livelock-AMQPersistenceAdapter-tp21418331p21418331.html Sent from the ActiveMQ - User mailing list archive at Nabble.com. ------=_Part_37709_16049610.1231778884526--