Servlet as JMS Sender/Receiver ?  
Author Message
udupi_mail





PostPosted: 2005-2-23 13:11:00 Top

java-programmer, Servlet as JMS Sender/Receiver ?
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.

 
Ken Hygh





PostPosted: 2005-3-1 19:50:00 Top

java-programmer >> Servlet as JMS Sender/Receiver ? email***@***.com wrote:

>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
 
Paul Ilechko





PostPosted: 2005-3-2 10:43:00 Top

java-programmer >> Servlet as JMS Sender/Receiver ? Ken Hygh wrote:

>>
> 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.