• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFE , message-driven question

 
Poobhathy Kannan
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What�s true about message-driven beans? (Choose all that apply)
A.A message-driven bean has a home interface but no component interface.
B.A client never knows a message-driven bean�s identity.
C.A Client sees a message-driven bean as JavaMail message consumer.
D.The lifetime of a message-driven bean is controlled by the container.

Answer
B,D

My View: There are no clients for message-driven beans, then how can we say "A client never knows a message-driven bean�s identity" ?

Pleas explain
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MDB instances are the consumers of the JMS messages. So the applications which send those messages are the client. An MDB never knows the client directly but only through the JMS broker; Nor do the client knows who will consume the messages they produce, they just send the message to broker. This is how loose coupling is acheived in Message oriented systems.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic