What are the advantages of entity beans over session beans?

September 18th, 2006 by uCertify Leave a reply »

An entity bean represents an entity such as an employer, student, etc. A session bean is a type of EJB (Enterprise JavaBean) that encapsulates the logic of a business process and business rules. Entity beans offer the following advantages over session beans:

  1. Persistence: Entity beans are persistent, i.e., the state of the bean exists beyond the lifetime of the application or the application process. There are two types of persistence: Bean-managed and Container-managed. In Bean-managed persistence, the code contains the calls that access the database. In Container-managed persistence, the EJB container generates the database calls.
  2. Shared Access: Multiple clients can share the entity beans. It works within the transactions as the client changes the data.
  3. Primary Key: Each entity bean has a unique object identifier that enables the client to locate a particular entity bean.
  4. Relationship: An entity bean can relate to other entity beans. Both CMP and BMP can be used to maintain relationships.
Click here to download scja test study guide and practice question. Download free practice test for SUN SCJA exam.
Like this article? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
  • Share/Bookmark
Advertisement

Leave a Reply

uCertify.com | Our Company | Articles | Contact Us | News and Press Release | uCertify India | Entries (RSS)
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD    Cisco Certification: CCNA, CCENT    A+, Network+, Security+ Project+
Oracle Certification: OCP 11g, OCP 10g, OCA 11g, OCA 10g    CIW foundation    EC-212-32,    CISSP    Photoshop ACE CS4    Adobe Flash ACE, PMP, CAPM
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.