Developing EJBs (continued)...Persistence in Entity Beans
Container Managed
- Container is responsible for saving state of bean
- Container needs to generate DB calls
- Bean persistence is independent of data source
- specify container-managed fields in Deployment Descriptor
Bean Managed
- Bean is itself responsible for saving its own state
- Bean needs to code its own DB calls
- Bean persistence is hard-coded and is hence less adaptible