aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes MDB Sender Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "MDB Sender" Watch "MDB Sender" New topic
Author

MDB Sender

Marco Lombardo
Ranch Hand

Joined: Jul 05, 2005
Posts: 71
This topic is a little out of the SCBCD.
But i have a question on a MDB!!
How can i send a message from a client to a J2EE Server that have a MDB with a specified onMessage method?

Thanks
Marco


Team Leader<br />SCJP, SCBCD , SCDJWS, Oracle WebLogic, IBM WebSphere e IBM FileNet Certified<br /> <br /><a href="http://www.marcolombardo.it" target="_blank" rel="nofollow">http://www.marcolombardo.it</a>
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
MDB can have only one onMessage method.
What do you mean specified?


SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Every MDB type is associated with a particular Topic or Queue. When a client sends a JMS message, the server will allocate a correct MDB instance to service that request. In other words, an MDB is invisible to the client (which is why MDBs have no home or remote interfaces).


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
MDB has no client view (no home/component interface), therefore client cannot call MDB directly. Instead, client send message to JMS and JMS will deliver the message to MDB.
[ January 30, 2006: Message edited by: Kengkaj Sathianpantarit ]
B.Sathish
Ranch Hand

Joined: Aug 18, 2005
Posts: 372
A JMS Topic or a queue is configured as a resource on the server under a JNDI name. A client has to do a JNDI look up to get a reference to a particular Topic or Queue and then post the message
Marco Lombardo
Ranch Hand

Joined: Jul 05, 2005
Posts: 71
OK ...
One question.
There is a EJB Server S1 that register a Queue with a name MX and
there is a EJB Server S2 that register a Queue with the same name.
If I look up with the JNDI name MX, what happen??
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
Do you mean load balancing?
I think this depend on scheduler, it may get the referece from Server1 or Server2 up to the algorithm.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: MDB Sender