I have a maven project embedding a broker using Spring XML / XBean with the 
STOMP transport configured. Any help would be greatly appreciated!



Logging indicates the broker starts and the STOMP transport has started on the 
configured port. However, using the STOMP example in the ActiveMQ 5.5 download 
times out and fails.
Starting ActiveMQ from the download and passing my XML config as a parameter 
(eg. activemq.bat xbean:mybroker.xml) and then running the same STOMP example 
works.
Both the other (vm / tcp) transports work as expected in my embedded broker
Here is my configuration snippets:
 POM.XML
<!--Start POM snippet -->
<properties>
...
<log4j-version>1.2.16</log4j-version>
<slf4j-version>1.6.1</slf4j-version>
<activemq-version>5.5.0</activemq-version>
<camel-version>2.7.2</camel-version>
<jetty-version>7.4.2.v20110526</jetty-version>
<springframework-version>3.0.5.RELEASE</springframework-version>
<xbean-version>3.7</xbean-version>
</properties>
<depencies>
...
<!-- Start: Messaging -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-spring</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-fileserver</artifactId>
<version>${activemq-version}</version>
<type>war</type>
</dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-javaconfig</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
<version>${camel-version}</version>
</dependency>
<!-- End: Messaging -->
...
</dependencies>
<!--End POM snippet -->

<!--Start mybroker.xml snippet -->
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
xmlns:amq="http://activemq.apache.org/schema/core"; 
xmlns:jms="http://www.springframework.org/schema/jms";
xmlns:context="http://www.springframework.org/schema/context";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd
http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/jms 
http://www.springframework.org/schema/jms/spring-jms-3.0.xsd";>

<context:property-placeholder />

<amq:broker id="server.Broker"
brokerName="${activemq.broker.name}" 
useJmx="false"
persistent="true"
dataDirectory="${activemq.broker.dataDir}"
start="true">
<amq:transportConnectors>
<amq:transportConnector name="vm"
uri="vm://${activemq.broker.name}" />
<amq:transportConnector name="tcp"
uri="tcp://0.0.0.0:47474" />
<amq:transportConnector name="stomp"
uri="stomp://0.0.0.0:61613" />
</amq:transportConnectors>
</amq:broker>

</beans>
<!--End mybroker.xml snippet -->

Broker is initialized using spring with a call like:  "new 
FileSystemXmlApplicationContext("/spring/mybroker.xml");"

Any ideas / suggestions getting STOMP transport to work on an embedded Broker?

Thanks in advance
SketchCND

Reply via email to