activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <de...@nighttale.net>
Subject Re: How to communicate between two Spring-webapps in Tomcat within the same VM
Date Thu, 26 Feb 2009 13:54:22 GMT
Hi Gisbert,

VM transport is the solution you need. It's only important that you use the
same broker name in both applications.

These two links should be enough to get ypu started

http://activemq.apache.org/vm-transport-reference.html
http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html#HowdoIembedaBrokerinsideaConnection-UsingActiveMQConnectionFactory

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Thu, Feb 26, 2009 at 1:30 PM, Gisbert Amm <gisbert.amm@1und1.de> wrote:

> Hi ActiveMQ list,
>
> you provide really great software!
>
> I'm sorry if I should ask something obvious, but I've read the manual
> and the website up and down and couldn't find a hint.
>
> I've got two webapps that are configured via Spring and deployt into
> Tomcat. I want them to communicate with each other via ActiveMQ within
> the same VM.
>
> ATM, I'm using
>
> <amq:networkConnector name="defaultNetworkConnector"
> uri="multicast://default"/>
>
> and
>
> <amq:transportConnector name="defaultTransportConnector"
> uri="tcp://@activemq.host@:@activemq.port@"
> discoveryUri="multicast://default"/>
>
> because I didn't find another solution for the first try (I could have
> used peer:, but the target system is firewalled, so I set the ports
> explicitly - the above syntax is for Maven filtering). This works like a
> charm.
>
> However, I don't really want two threads within the same VM to
> communicate over TCP sockets. I tried vm:, but it didn't work. I was not
> able to find out how the beans of my second webapp's context should be
> configured to use the queues defined in the context of the first webapp.
>
> Can somebody point me to an example or some documentation on how to
> configure this setup with Spring?
>
> That would be great.
>
> Thank you,
> Gisbert
>
>
> ------------------------------------------------------------------------------------------------------------
> "Fact 23. One of the two most common causes of runaway projects is
> unstable requirements. (Robert L. Glass)"
>
> ------------------------------------------------------------------------------------------------------------
>
> Gisbert Amm
> Softwareentwickler
> Development Hosting - Integration
>
> 1&1 Internet AG | Elgendorfer Strasse 57 | 56410 Montabaur
> FON: +49 721 / 91374-4224 | E-MAIL: gisbert.amm@1und1.de
>
> Amtsgericht Montabaur HRB 6484
>
> Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas
> Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr.
> Oliver Mauss, Jan Oetjen
> Aufsichtsratsvorsitzender: Michael Scheeren
>
>

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