• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB in struts...

 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where does EJB feets into struts (MVC architecture)...

Model - bean classes
View - JSPs
Controller - Servlet that handles request and responds with the help of Action and other classes...

Thanks a lot.
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Where does EJB feets into struts (MVC architecture)...

Model - bean classes
View - JSPs
Controller - Servlet that handles request and responds with the help of Action and other classes...


If you make use of EJB, Struts can be totally regarded as a Web component.

Model is a bean class, but it could be a simple JavaBean (not EJB) as Entity bean is seldom (or should not be) disclose to the client side.

View is JSP

Controller is the ActionServlet. However, the servlet is mainly used for "controlling" the Web tier flow. When it receives requests, it checks for the types of requests, and then forward the request to the corresponding session bean. After the finished the processes, the servlet obtained the data and then determine the corresponding view for display.

Since EJB holds the business logic, thus, Strut will then become purely Web component and it seldom provides business logic except very special needs.

Nick
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in short, Struts and EJB live in a different tier of enterprise system.
Struts = web tier
EJB = business tier

the most common connection between the 2 is that EJB provide heavy business logic and the model (regular java bean) as the result for web tier.
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use Session Facade Pattern in your Action classes to control your model.
reply
    Bookmark Topic Watch Topic
  • New Topic