Servlet as JMS Sender/Receiver ?

U

udupi_mail

Can a Servlet act as both a JMS Message Sender and Receiver?

Clients who call on this servlet would be BLOCKING for a response.
The servlet itself upon receival of client request sends the message to
the request MQ queue. This message will be picked up by a standalone
app(JMS client), after processing would write to the response queue.
Meanwhile the servlet would be polling onto the response JMS queue with
receive(timeOutPeriod) with the appropriate msg-selector.

Is there any other approach to avoid the blocking receive. I have read
that server side polling would use lot of sys resources and block the
threads. What other feasible approach is possible?

Having an asynch imple. is a NO in this case because clients cannot
write messages to the Queue.

The appln is hosted on WebSphere5 ND.


Any feedback would be very helpful. Thanks.

- Guru.
 
K

Ken Hygh

Can a Servlet act as both a JMS Message Sender and Receiver?

Clients who call on this servlet would be BLOCKING for a response.
The servlet itself upon receival of client request sends the message to
the request MQ queue. This message will be picked up by a standalone
app(JMS client), after processing would write to the response queue.
Meanwhile the servlet would be polling onto the response JMS queue with
receive(timeOutPeriod) with the appropriate msg-selector.

Is there any other approach to avoid the blocking receive. I have read
that server side polling would use lot of sys resources and block the
threads. What other feasible approach is possible?

Having an asynch imple. is a NO in this case because clients cannot
write messages to the Queue.

The appln is hosted on WebSphere5 ND.


Any feedback would be very helpful. Thanks.

- Guru.
I've seen a number of customers do exactly this.
Ken
 
P

Paul Ilechko

Ken said:
I've seen a number of customers do exactly this.
Ken

Doesn't mean it's a good thing ;-)

Sounds to me like they're using MQ when they really should be using a
synchronous protocol because someone said that's what they support, so
rather getting a bad decision changed, they're working around it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,832
Latest member
GlennSmall

Latest Threads

Top