activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SketchCND <sketchguard-apa...@yahoo.co.uk>
Subject Embedded Broker with STOMP example
Date Fri, 01 Jul 2011 15:21:24 GMT
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.
Bothe the other (vm / ssl) 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:plugins>
<amq:simpleAuthenticationPlugin>
<amq:users>
<amq:authenticationUser username="${activemq.broker.auth.userName}"
password="${activemq.broker.auth.password}" 
groups="admins,publishers,consumers" />
</amq:users>
</amq:simpleAuthenticationPlugin>
</amq:plugins>
<amq:systemUsage>
            <amq:systemUsage>
                <amq:memoryUsage>
                    <amq:memoryUsage limit="256 mb"/>
                </amq:memoryUsage>
                <amq:storeUsage>
                    <amq:storeUsage limit="1 gb"/>
                </amq:storeUsage>
                <amq:tempUsage>
                    <amq:tempUsage limit="100 mb"/>
                </amq:tempUsage>
            </amq:systemUsage>
        </amq:systemUsage>
<amq:transportConnectors>
<amq:transportConnector name="vm"
uri="vm://${activemq.broker.name}" />
<amq:transportConnector name="ssl"
uri="ssl://0.0.0.0:47474?transport.needClientAuth=true" />
<amq:transportConnector name="stomp"
uri="stomp://0.0.0.0:61613" />
</amq:transportConnectors>
</amq:broker>

<import resource="jms-config.xml" />
</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
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message