wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes JMS vs MDB? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS vs MDB?" Watch "JMS vs MDB?" New topic
Author

JMS vs MDB?

Joe McGuire
Ranch Hand

Joined: Mar 19, 2001
Posts: 293
Would anyone care to elaborate on a situation or circumstance when one would choose to use a Message Driven Bean over a JMS app?
Craig Berry
Author
Greenhorn

Joined: Aug 02, 2001
Posts: 25
Joe,
To a certain extent it comes down to why you would use any type of bean. You would want to use an MDB if the processing of the message you are going to be doing requires some of the abilities that using an EJB can provide, security, tx, scalability etc.
MDBs really just fufill the requirement for asynchronous communication with EJBs, without having to use startup classes or whatever, and they are not inteneded to replace JMS apps.
------------------
Craig Berry
Author of Professional EJB


Craig Berry<br />Author of <a href="http://www.amazon.com/exec/obidos/ASIN/1861005083/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional EJB</a>
Matjaz Juric
Author
Ranch Hand

Joined: Aug 02, 2001
Posts: 65
Exactly as Craig said. MDB are components like other EJBs. They can use services provided by EJB container, they can be used as facades to enable asynchronous communication etc. They can also optimize the communication with other beans, using local interfaces etc.
Matjaz

------------------
Matjaz Juric
Author of Professional EJB


Matjaz Juric<br />Author of <a href="http://www.amazon.com/exec/obidos/ASIN/186100544X/qid%3D1008676221/sr%3D8-1/ref%3Dsr%5F8%5F5%5F1/103-4928879-8274265" target="_blank" rel="nofollow">Professional J2EE EAI</a> and <a href="http://www.amazon.com/exec/obidos/ASIN/1861005083/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional EJB</a>
Joe McGuire
Ranch Hand

Joined: Mar 19, 2001
Posts: 293
Thanks guys, that adds some clarity.
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1372
I am replying the very old thread.

I do not understand Craig statement without having to use startup classes ? What startup classes ?
 
Consider Paul's rocket mass heater.
 
subject: JMS vs MDB?