There was some discussion last

There was some discussion last night regarding the use of JMS behind altRMI to

make asynchronous calls. Taking the idea further, I wondered if it might be

possible to implement asynchronous callbacks using temporary queues. So

requests that take a long time, but need to return a response to the user could

present a ‘please wait…’ message, or pop up an alert when the response has

arrived, without the client having to poll the server.

Some sample code I found here

looked a bit like this:


Queue tempQueue = qSession.createTemporaryQueue();

TextMessage request = qSession.createTextMessage();

request.setJMSReplyTo(tempQueue);

QueueReceiver qReceiver = qSession.createReceiver(tmpQueue);

qReceiver.setMessageListener(new MyMessageListener(. . .));

Could be interesting, perhaps.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s