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 are the benefits of ejb?

548


Match the ejb functions given below with the functionality equivalent in sql?

545


Is ejbCreate() method mandatory while defining a Session Bean?

590


What is ptp model?

577


What is enterprise bean provider?

599






What is difference between ejb 1.1 and ejb 2.0?

567


What is bean-managed persistence?

573


What is the procedure for the creation of stateless ejb?

538


Is udp stateless?

571


How many enterprise beans?

542


What is ejb and its properties?

522


What are the advantages of java beam?

519


What is the use of @resource?

545


Differentiate ‘Stateful Session’ from ‘Entity Bean’ ?

529


Is it possible to write two ejb’s that share the same remote and home interfaces, and have different bean classes? If so, what are the advantages/disadvantages?

508