Meaningless Drivel is fun!*
The moose likes EJB and other Java EE Technologies and the fly likes JMS What is Synchronous and which is asynchronous Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS What is Synchronous and which is asynchronous" Watch "JMS What is Synchronous and which is asynchronous" New topic
Author

JMS What is Synchronous and which is asynchronous

sandeeprajsingh tandon
Ranch Hand

Joined: Mar 06, 2009
Posts: 70
Hi,

I got confused in JMS points . I hope someone can clear it.

Am i correct

1 ) "MDB's are for asynchronous communication."

2) If above is true, then MDBs even if listening on Queue or Topic are always asynchronous

3) The message producer be it queue or topic doesnot expect MDB to be UP while delivering message, Queue or Topic.

4) Bu then Queue comes under PointToPoint communication which means, the consumer has to be UP.

5) There is no way to make MDB synchronous.

sandeeprajsingh tandon
Ranch Hand

Joined: Mar 06, 2009
Posts: 70
Hello Anyone there???
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

"MDB's are for asynchronous communication."
absolutely true .

If above is true, then MDBs even if listening on Queue or Topic are always asynchronous :
question doesn't make sense as already you specified that ""MDB's are for asynchronous communication."


The message producer be it queue or topic doesnot expect MDB to be UP while delivering message, Queue or Topic.
: Absoultely True

But then Queue comes under PointToPoint communication which means, the consumer has to be UP :
: The Consumer has to be up if you want your Message to be picked up from the Queue and Processed . (Incase if the Consumer (MDB) is down your message will stay in the Queue only . )


You are free to ask if you aren't clarified .

Thanks


Save India From Corruption - Anna Hazare.
sandeeprajsingh tandon
Ranch Hand

Joined: Mar 06, 2009
Posts: 70
Thanks Ravi
Victor Ramen
Ranch Hand

Joined: Jul 14, 2008
Posts: 56
Hello,
I do not have a lot of expereince in this, but I will try to answer.
With regards to the last question:

MDBs (or rather JMS messages) are designed for asynchronous communication. I guess messages by default are persistent and durable( which means even if destination is not up at the time of message delivery, it can be delivered later).

But if required, they can be made synchronous...but this is not recommended. Default is : asynchronous

Best wishes,
Roy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS What is Synchronous and which is asynchronous
 
Similar Threads
Web Services And JMS
MDB + Entity Bean / MDB + SB + EB
MESSAGES FROM Topic
return value to the calling servlet from messageDrivenBean
asynchronous jms consumer