Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Entity EJB and Session EJB

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
 
I like you because you always keep good, crunchy cereal in your pantry. This tiny ad agrees:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic