GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  EJB
Go To First  |  Previous Question  |  Next Question 
 EJB  |  Question 10 of 175    Print  
What is Entity Bean. What are the various types of Entity Bean

Answered by Jey on 2005-05-08 12:47:06:

Entity bean represents the real data which is stored in the persistent storage like Database or file system. For example, There is a table in Database called Credit_card. This table contains credit_card_no,first_name, last_name, ssn as colums and there are 100 rows in the table. Here each row is represented by one instance of the entity bean and it is found by an unique key (primary key) credit_card_no. 
 
There are two types of entity beans. 
1) Container Managed Persistence(CMP)  
2) Bean Managed Presistence(BMP)




  
Total Answers and Comments: 5 Last Update: June 19, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 08, 2005 12:47:06   #1  
Jey        

RE: What is Entity Bean. What are the various types of Entity Bean
Entity bean represents the real data which is stored in the persistent storage like Database or file system. For example, There is a table in Database called Credit_card. This table contains credit_card_no,first_name, last_name, ssn as colums and there are 100 rows in the table. Here each row is represented by one instance of the entity bean and it is found by an unique key (primary key) credit_card_no. 
 
There are two types of entity beans. 
1) Container Managed Persistence(CMP)  
2) Bean Managed Presistence(BMP)

 
Is this answer useful? Yes | No
May 20, 2005 08:52:30   #2  
Mohan        

RE: What is Entity Bean. What are the various types of Entity Bean
Entity Beans are modelled as real world entities. They represent a live entity and they carry data pertaining to that entity
 
Is this answer useful? Yes | No
June 02, 2005 11:59:12   #3  
Rokkam        

RE: What is Entity Bean. What are the various types of Entity Bean
State is maintained in the database,the state of the enterprise bean persists longer than the request,the session,or even the server or container life time.This is why we sometimes say that entity beans survive a server crash. 
Flavours of Entity bean are:: 
1)Container managed persistancy(CMP) 
These deligate their persitancy to their EJB container. 
2)Bean managed persistancy(BMP) 
These manage their own persistancy means JDBC code to be written in bean itself.

 
Is this answer useful? Yes | No
July 25, 2005 02:30:13   #4  
Ritesh Patni        

RE: What is Entity Bean. What are the various types of Entity Bean
The entity bean is used to represent data in the database. It provides an object-oriented interface to data that would normally be accessed by the JDBC or some other back-end API. More than that, entity beans provide a component model that allows bean developers to focus their attention on the business logic of the bean, while the container takes care of managing persistence,transactions, and access control. There are two basic kinds of entity beans: container-managed ersistence (CMP)and bean-managed persistence(BMP).Container-managed persistence beans are the simplest for the bean developer to create and the most difficult for the EJB server to support. This is because all the logic for synchronizing the bean's state with the database is handled automatically by the container. This means that the bean developer doesn't need to write any data access logic, while the EJB server is supposed to take care of all the persistence needs automatically. With CMP, the container manages the persistence of the entity bean. Vendor tools are used to map the entity fields to the database and absolutely no database access code is written in the bean class .he bean-managed persistence (BMP) enterprise bean manages synchronizing its state with the database as directed by the container. The bean uses a database API to read and write its fields to the database, but the container tells it when to do each synchronization operation and manages the transactions for the bean automatically. Bean-managed persistence gives the bean developer the flexibility to perform persistence operations that are too complicated for the container or to use a data source that is not supported by the container. 
 

 
Is this answer useful? Yes | No
June 19, 2006 07:25:14   #5  
sujatawankhede Member Since: May 2006   Contribution: 11    

RE: What is Entity Bean. What are the various types of...
entity bean are used to represent state of unique entity.for example. each employee have unique ID .
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape