File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes HFE , message-driven question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "HFE , message-driven question" Watch "HFE , message-driven question" New topic

HFE , message-driven question

Poobhathy Kannan
Ranch Hand

Joined: May 26, 2004
Posts: 94
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.


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

Joined: Feb 27, 2002
Posts: 8927

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.

I agree. Here's the link:
subject: HFE , message-driven question
It's not a secret anymore!