dcsimg
difference between managing persistence and managing transaction
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ranjith_ayinala
Posted On:   Monday, May 6, 2002 11:29 PM

entity beans transactions must be managed by container in all cases but there can be persistence of BMP type or CMP type..Right?...
while there can be a bean managed persistence we cannot have bean managed transaction why is it so...
whats actual difference between managing persistence and managing transaction ....
throw some light pls

Re: difference between managing persistence and managing transaction

Posted By:   AlessandroA_Garbagnati  
Posted On:   Tuesday, May 7, 2002 12:26 AM

Hi,

Yes, you are right, Bean-Managed Transaction is only possible with Session EJB, bacause Entity EJB must use Container-Managed Transaction.


Transaction and persistence are two different things.

In an EJB environment we would say that managing persistence means managing the process of coordinating the data represented by a bean instance with the database.

A transaction is a set of operations that must be processed as a single unit, so managing transactions means defining which operations has to be considered as part of that set.


When you manage the persistence of a bean (BMP or CMP), all the operations that are done to manage the bean has to be considered as part of a single transaction. In a session bean, the developer can put together many entity bean and define all these operations as part of the same transaction.

About | Sitemap | Contact