Difference between container-managed & bean-managed
persistence?

Answer Posted / janet

In container-managed persistence, entity bean data is
automatically maintained by the container using a mechanism
of its choosing. For example, a container implemented on top
of an RDBMS may manage persistence by storing each bean?s
data as a row in a table. Or, the container may use Java
programming language serialization for persistence. When a
bean chooses to have its persistence container managed, it
specifies which of its fields are to be retained.

In bean-managed persistence, the bean is entirely
responsible for storing and retrieving its instance data.
The EntityBean interface provides methods for the container
to notify an instance when it needs to store or retrieve its
data.

Is This Answer Correct ?    16 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ejb in java?

625


What are the components of session beam?

715


What is entity bean in ejb?

627


What optimization could I use if the ejb container is the only point of write access to the database?

650


Is soap stateless or stateful?

629






in EJB diclare the static methods are not?

3011


What is ejb 3?

618


What is the difference between ejbcreate() and ejbpostcreate?

614


Can remove() be a Stateless Session bean?

663


How does ejb container work?

594


How ejb invocation happens?

651


What is the advantage of using entity bean for database operations, over directly using jdbc api to do database operations? When would I use one over the other?

732


Why is ejb used?

590


What is the difference between find and select methods in ejb?

624


An instance of stateful session ejb when accessed simultaneously from more than one clients on same vm results in remoteexception or ejbexception. In case the client is a servlet thread, which of the techniques can be used to avoid remoteexception/ejbexception?

641