activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gisbert Amm <gisbert....@1und1.de>
Subject Re: How to communicate between two Spring-webapps in Tomcat within the same VM
Date Thu, 26 Feb 2009 15:18:04 GMT
Hi Dejan,

thank you for the quick response. I've tried the setup that you describe
(same broker name in both apps) but found, that each application started
it's own broker and they didn't communicate with each other. That's why
I asked.

-Gisbert

Dejan Bosanac schrieb:
> 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.


Mime
View raw message