ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Request Response .... architecture using JMS

Post new topic  Reply to topic
 Request Response .... architecture using JMS « View previous topic :: View next topic » 
Author Message
Neeraja
PostPosted: Wed Feb 13, 2002 5:15 am    Post subject: Reply with quote

Newbie

Joined: 06 Dec 2001
Posts: 4

Trying to have an acknowledgement after putting the message on the MQSeries Server using MQSeries Client(MA88 only).
I used the QueueRequester class and used the request method of it. The message is placed successfully on a queue as given in the constructor of QueueRequester but when I tried to respond back from the server side using the temporary queue ( created by the .... tempQueue = (Queue) message.getJMSReplyTo(); ) and tried to create the QueueSender using this queue it started giving me the exception reason code .. 2085..
The crux is I am unable to get the queueSender...

The point to be noted here is I am trying to access a queue which is temporary one created by the QueueRequester class.When I get a System.out.print of that temp. Queue , I get it as good as any object.
By the help of this queue when I try to create the queue sender ,I get an Exception.

code in brief :-

I made two threads .. one for Request and one for Reply.....

in first thread :

TextMessage reply = (TextMessage) queueRequestor.request(message); // now this thread will hang till it gets the response from the server..

in second thread:

queueReceiver = queueSession.createReceiver(queue);
queueConnection.start();
message = (TextMessage) queueReceiver.receive();
message.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);// temp R&D

System.out.println("REPLY: Message received: "
+ message.getText());
Queue tempQueue = message.getJMSReplyTo();
reply = queueSession.createTextMessage();
reply.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
reply.setText(REPLY_TEXT);
reply.setJMSCorrelationID(message.getJMSMessageID());
System.out.println("REPLY: Sending reply: " + reply.getText());

System.out.println("Here is the error"); // this reply sender below is not being created...
replySender = (com.ibm.mq.jms.MQQueueSender)queueSession.createSender(tempQueue);
replySender.send(tempQueue,reply);





_________________
Neeraj Ahuja
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Request Response .... architecture using JMS
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.