QueueRequestor is a class that sends a message to a queue 
and attaches a temporary queue in the JMSReplyTo field for 
any reply to that request. In order for you to implement a
timeout for QueueRequestor, you have to extend
that class and instead of calling receiver.receive(),
which blocks until a message comes, use receiver.receive(timeout). 
It will return null if it times out, so you have to check for it.

Hope this helps


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Geoffrey Lowney
Sent: Thursday, June 14, 2001 7:14 PM
To: [EMAIL PROTECTED]
Subject: [developers] queueRequestor.request with timeout?


I want to call queueRequestor.request(message), but I want to timeout if no
answer comes within the specified time.  Does anyone know a way to do this?
I saw that the iBus implemented a queueRequestor.request(message, timeout)
method, but SwiftMQ (I'm running 2.1.1) does not have such a method.  I
tried setting up a timer thread, but I can't find a way to interrupt the
request() call.  I tried closing the queueRequestor from the timer thread,
but nothing happened (request() did not return).  Does anyone have any
ideas?  I am not a JMS expert, so I am not sure how easy it would be to
implement my own queueRequestor or something.

Thanks

Geoffrey A. Lowney
Senior Software Development Engineer
Recreational Equipment, Inc.
Phone 253-395-8164 Fax 253-437-7291
Pager 206-625-8477 [EMAIL PROTECTED]
[EMAIL PROTECTED] http://www.rei.com/
In order to draw a limit to thinking, we should have to think both sides of
this limit.
-- Ludwig Wittgenstein, Tractatus Logico-Philosophicus 


------------------------------------------------------
SwiftMQ developers mailing list * http://www.swiftmq.com
To unsubscribe from this list, send an eMail to 
[EMAIL PROTECTED] and write in the body of your message:
UNSUBSCRIBE developers <your-email-address>
Archive: http://www.mail-archive.com/developers@mail.iit.de/


------------------------------------------------------
SwiftMQ developers mailing list * http://www.swiftmq.com
To unsubscribe from this list, send an eMail to 
[EMAIL PROTECTED] and write in the body of your message:
UNSUBSCRIBE developers <your-email-address>
Archive: http://www.mail-archive.com/developers@mail.iit.de/




Reply via email to