Because the state of an entity bean is saved in a storage mechanism, it is persistent.
Persistence means that the entity bean's state exists beyond the lifetime of the application or the J2EE server process.
If you have worked with databases, you are familiar with persistent data. The data in a database is persistent because it still exists even after you shut down the database server or the applications it services.
There are two types of persistence for entity beans: bean-managed and container-managed.
With bean-managed persistence, the entity bean code that you write contains the calls that access the database.
If your bean has container-managed persistence, the EJB container automatically generates the necessary database access calls. The code that you write for the entity bean does not include these calls.
Persistence means that the entity bean's state exists beyond the lifetime of the application or the J2EE server process.
If you have worked with databases, you are familiar with persistent data. The data in a database is persistent because it still exists even after you shut down the database server or the applications it services.
There are two types of persistence for entity beans: bean-managed and container-managed.
With bean-managed persistence, the entity bean code that you write contains the calls that access the database.
If your bean has container-managed persistence, the EJB container automatically generates the necessary database access calls. The code that you write for the entity bean does not include these calls.
