activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sparky2708 <da...@columbia.edu>
Subject Re: Can't figure out why send to my temporary queue doesn't work but Listener seems OK
Date Mon, 02 Apr 2007 17:36:36 GMT

Thanks James. I figured it out. This link was VERY HELPFUL:

http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html 



sparky2708 wrote:
> 
> What I am trying to accomplish is that I need a temporary queue that I can
> use like a control queue. I would like my clients to be able to send
> messages to a service's control queue (this could be permanent) and the
> service would be able to send responses to each client's control queue
> (indicated in the request they make). The client's control queue should
> disappear when the client disappears. How can my service send messages to
> a client's temporary queue if I can't send by name? Or what's an
> alternative way to accomplish the same thing? 
> 
> 
> James.Strachan wrote:
>> 
>> On 4/2/07, sparky2708 <daa82@columbia.edu> wrote:
>>>
>>> I create a temporary queue using:
>>>
>>> String user = ActiveMQConnection.DEFAULT_USER;
>>> String password = ActiveMQConnection.DEFAULT_PASSWORD;
>>> ActiveMQConnectionFactory connectionFactory = new
>>> ActiveMQConnectionFactory(user, password, jms_url);
>>> _connection = connectionFactory.createConnection();
>>> _connection.setExceptionListener(this);
>>> _connection.start();
>>> _session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
>>> Queue queue = _session.createTemporaryQueue();
>> 
>> You should be sending messages to this queue object (which is an
>> instanceof ActiveMQTempQueue.  You should not be extracting the queue
>> name then using that name to send to.
>> -- 
>> 
>> James
>> -------
>> http://radio.weblogs.com/0112098/
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Can%27t-figure-out-why-send-to-my-temporary-queue-doesn%27t-work-but-Listener-seems-OK-tf3506946s2354.html#a9795321
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message