• 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

Entity EJB and Session EJB

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am a newer of EJB. Could you tell me what's the difference between Entity EJB and Session EJB. And why should we use EJB in web application. If you guys can give me some example. That would be great.
 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Reason for using the EJB:
a. To seperate the Business logic.
b. To create a Distributed component.
c. To maintain the security, transaction, naming services by the EJB container. Here in this case we don't need to bother about the above said criteria.
2. Difference between Entity Bean and Session Bean:
a. Entity Bean acts as a model for real time objects. i.e. Any real time objects can be a entity bean which persists the data in the storage medium.
b. Session bean is extends to the client action. i.e. It will the decide the work flow. It won't be stored in the storage medium.
Regards,
M.S.Raman.
 
fei long
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Malli Subramanian Raman!
Actually, i am doing a web application projects.
I want to write codes about maintain customer's information and order information which is stored in database. Is it necessary to write EJB for these manipulation?(such as OrderBean, CustomerBean) If necessary, session or entity EJB should i use?
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. You probably want to read one of the many good books on EJB architecture. I would suggest "Core J2EE" by Deepak Alur, et. al., or "EBJ Design Patterns" by Floyd Marinescu. In the meantime, take a look at this article and this article for a little more guidance. Another good source of information is the Sun Blueprints for J2EE. All of the resource referenced above should help clarify your understanding of the proper role and use of each type of EJB.
Kyle
 
The only thing that kept the leeches off of me was this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic