JavaDeploy
SiteMap
JSP - Servlets
JDBC
EJB Concepts
Entity Beans
Entity Beans
«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
How do you find an entity bean using the primary key?
1) The client invokes the findByPrimaryKey() method of the home object passing it the primaryKey object.
2) The container creates an instance of the bean and asks it to look up the data.
3) The instance looks up the data and, if the key matches some data, the data is read into the bean instance.
4) The bean instance returns control to the container.
5) The container creates an EJBObject for the primary keys.
6) The home object returns the EJBObject remote reference to the client. The client can then access the bean instance for that primary key.