*
The moose likes Servlets and the fly likes ejb or servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "ejb or servlets" Watch "ejb or servlets" New topic
Author

ejb or servlets

shawn kennedy
Ranch Hand

Joined: Oct 31, 2002
Posts: 67
Hi,
I would like to know when is it advantageous to use servlets over ejb and when adv to use ejb over servlets.Also wht r the advantages of ejb over servlets and servlets over ejb
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5371
EJB and servlet are totally two different things.
You make use of EJBs to implement your business logic and use servlet to process HTTP request.
Servlet makes use of EJB to process request and to applies biz rules as per application need.
Biz logic can also be put in servlets and in normal beans but EJB provides implicit facilities for enterprise applications like handling of transactions, concurrency, security, load balancing etc. If one wants to implement these facilities in normal application[using only normal beans] then one has to explicit write code for these facilities.
Please correct me if I am wrong.
[ July 16, 2003: Message edited by: Ravish Kumar ]

"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ejb or servlets