activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shelley, Ryan" <>
Subject Multiple webapps using VM brokers
Date Thu, 13 Jan 2011 00:41:45 GMT
I'm pretty green to ActiveMQ, but we're diving in and trying to get it to work within our environment
(ActiveMQ 5.2, Java 1.6, RHEL5).  One issue we had, and probably due to my incomplete comprehension
of ActiveMQ, came about when we tried running two webapps that both used local VM brokers.
 We'd get errors where one broker would hang waiting for a lock that we assume the other webapp
had, or we'd get errors about a VM broker already being created.  We also tried running ActiveMQ
as a WAR in Tomcat with our other webapps, but since we couldn't configure the startup order
of the webapps, we had our webapps failing because the ActiveMQ webapp wasn't up yet.

So, I suppose my question is multipart.  First, must the data directory for two VM brokers
be different (our config file for ActiveMQ was being shared between webapps, so each VM broker
shared the same URI, brokerName, data directory, etc)?

Second, is there a way to make the connectivity to a broker delayed (say, until first request,
like Spring's RMI config), or retry gracefully?

Currently, if it fails connecting to a broker at startup, the entire webapp fails.  If we
configure reconnect retry attempts, the webapp will block during startup, which will block
loading other webapps, which may include the ActiveMQ webapp, so it eventually fails.

Third, what is industry standard (or recommended) approach for setting up ActiveMQ services?
 In a separate, dedicated Tomcat instance?  As the executable (through Jetty)?  As an embedded
VM broker per webapp (or shared VM broker for multiple webapps)?  Some other approach?


Ryan Shelley

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message