JavaDeploy
SiteMap
JSP - Servlets
JDBC
EJB Concepts
Entity Beans
Distributed Transactions
«Prev
Entity Beans
EJB Distributed Transactions
Overview EJB Transactions
Transactions Remote Objects
Management Distributed Transactions
Java Transaction API
Client Managed Transaction
Bean Managed Transactions
Container Managed Transactions
Bean interactions Transaction Controls
Session Beans Transactions
EJB Transaction Exception
Choosing Differen Management Schemes
EJB Distributed Transaction
Entity Bean Components
Entity Bean Architecture
Entity Bean Characteristics
Primary Key Object Identity
Locating Entity Bean
Bean Managed Persistence
Container Managed Persistence
Entity Bean Life Cycle
Entity Bean Conclusion
Client View Bean
Creating Entity Instance
Find Bean using Key
Comparing Entity Instances
Entity Bean Client Conclusion
Bean Managed Persistence
122
EJB Container interposition using a Banking Example
The client to the BankAccount bean instance invokes the credit() method on the EJBObject.
The EJBObject of the BankAccount's instance EJBOject, which is really part of the container, starts the transaction
The EJBObject, having started the transaction, invokes the credit() method of the instance.
The bean performs the credit() method. The last step in this method is to write the data to the persistent store.
The method is complete so control is returned back to the EJBObject
The EJBObject commits the transaction on behalf of the bean instance. The data at this point, will be permanently written to the database or rolled back if there was any problem.
The EJBObject returns back to the client.