Say you're writing an Enterprise JavaBean that represents a persistent
object, such as a customer or a product. You have two choices for getting
data (such as customer name and product number) from the bean to the database
and back: You can let the bean's runtime environment its container, in EJB
speak do the heavy lifting for you.... ....or you can provide the logic
yourself along with your bean. It seems like an easy choice. Why write code
when you don't need to? Frequently, in fact, container-managed persistence
will be a good match for a project. However, if you want your bean to be
portable across multiple EJB servers, or if you find that the
container-managed persistence provided by your chosen EJB server is
inadequate, you'll need to turn to bean-managed pers... (more)