Hi All,
I've read a good thread about JMS and EJB in this group. One messages says "In EJB 1.1 it is perfectly possible to send JMS messages within a session (or entity) bean. It is also possible to SYNCHRONOUSLY receive a JMS message within a bean (receive method on the MessageConsumer called in the bean method)."
My question is: Can we send a message from one method in our bean and then call another method in the bean to wait for return message? (synchronously, of course.)
Any comments are appreciated.
PC
-
Send-receive message from the same SSBean - How? (1 messages)
- Posted by: Pengju Cheng
- Posted on: July 09 2001 14:20 EDT
Threaded Messages (1)
- Send-receive message from the same SSBean - How? by Aditya Anand on July 09 2001 16:38 EDT
-
Send-receive message from the same SSBean - How?[ Go to top ]
- Posted by: Aditya Anand
- Posted on: July 09 2001 16:38 EDT
- in response to Pengju Cheng
Yes you can use MessageConsumer.receive(), MessageConsumer.receive(long timeout) or MessageConsumer.receiveNoWait() methdos to proactively receive messages, the receiveNoWait() does not block... it returns a Message if one is currently present otherwise returns null. receive() blocks indifinitely or returns null if the session is closed while it's blocked, receive(long) returna a Message if one is received before it times out otherwise returns null
Cheers
Adi