• Post Reply Bookmark Topic Watch Topic
  • New Topic

Where is EJB in MVC pattern

 
madhav changala
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi advance HAPPY NEW YEAR.i am new to the concept of EJB's ,actually why we need EJB and before EJB' were not there which one did the job of EJB's.and Where it excatly in MVC pattern.
Thankns in advance
 
Franck Smith
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before you use EJB, you may use JDBC connection to access your database.
EJB are not part of MVC pattern.

For more information you can go to the online tutorial from sun :
http://java.sun.com/developer/onlineTraining/J2EE/Intro2/j2ee.html
 
Pratik Lohia
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJBs form the Business Layer. In the MVC pattern they are at the Model Layer.
EJB is where you write all the Business Logic of your application.
EJBs can be Session, Entity or Session Types, and interface with the database using DAOs(Session) or directly(Entity).
Learning of EJBs is available on the internet. A very good book would be Ed Roman for beginners.
[ December 27, 2005: Message edited by: Pratik Lohia ]
 
Michael Duffy
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends on the EJB.

I'd say entity EJBs can be thought of as part of the Model or, better yet, the Persistence layer. (Unfortunately, there's no persistence explicitly in MVC.)

SLSB can be part of the Controller layer, as can SFSB.

Where to slot MDBs? No clients for those, so they weren't part of the pattern when Smalltalkers came up with it. Controllers can make use of MDBs, so you might lump them in there, but they're more properly part of asynchronous processing patterns.
 
madhav changala
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for replay.
 
ravi indra
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
before ejb usually the bussiness methods were written in either in the java bean component, or even in the servlets also.

if the ejb is a entity bean then we will be calling the EB from model
if the ejb is a SLSB we may call it form the action servlet also.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!