activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msmith <msm...@denimgroup.com>
Subject Re: Duplicate brokers created in Tomcat
Date Wed, 15 Feb 2012 00:01:36 GMT
Hello. I have a similar problem that I would greatly appreciate any guidance
towards resolving it. 

I divided up a Spring web application into two WAR files and deployed them
onto an Apache Tomcat 7 server. If either WAR is deployed I get no errors
and can view the associated web pages, but if both are deployed at the same
time the log states:         

INFO : org.apache.activemq.store.kahadb.plist.PListStore -
PListStore:..\activemq-data\localhost\tmp_storage started
INFO : org.apache.activemq.broker.BrokerService - Using Persistence Adapter:
KahaDBPersistenceAdapter[C:\Program Files\Apache Software Foundation\Tomcat
7.0\..\activemq-data\localhost\KahaDB]
INFO : org.apache.activemq.store.kahadb.MessageDatabase - Database
..\activemq-data\localhost\KahaDB\lock is locked... waiting 10 seconds for
the database to be unlocked. Reason: java.io.IOException: File
'..\activemq-data\localhost\KahaDB\lock' could not be locked as lock is
already held for this jvm.
INFO : org.apache.activemq.store.kahadb.MessageDatabase - Database
..\activemq-data\localhost\KahaDB\lock is locked... waiting 10 seconds for
the database to be unlocked. Reason: java.io.IOException: File
'..\activemq-data\localhost\KahaDB\lock' could not be locked as lock is
already held for this jvm.

The Tomcat server uses activemq-data and KahaDB as its file based
persistence database (not sure what version - my apologies). Both projects
contain the same (duplicate) ConnectionFactory bean:     
		
<bean id=&quot;connectionFactory&quot;
       
class=&quot;&lt;b>org.springframework.jms.connection.CachingConnectionFactory*"
        p:exceptionListener-ref="jmsExceptionListener"
p:sessionCacheSize="100">
        <constructor-arg ref="amqConnectionFactory" />
</bean>

Finally, the jms broker URL specified within each project is:
url=vm://localhost?broker.useJmx=false&broker.dataDirectory=../activemq-data

I have been reading up on embedded vs. standalone activemq servers and have
tried implementing both but have not met with success. My problem(s) here
may be an obvious one  - I have been looking too long at this and would
welcome any suggestions or thoughts.


--
View this message in context: http://activemq.2283324.n4.nabble.com/Duplicate-brokers-created-in-Tomcat-tp3003512p4389009.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message