Describe how to use the primary key/compare identity of entity bean.
Primary Key and Object Identity
Every entity bean has a unique identity within its home.
This identity, known as the primary key, relates directly to the underlying data. Entity beans can be looked up by their clients using this primary key.
The primary key identifies the entity bean within its home. Two beans in different containers (different homes) may have the same primary key.
This feature allows load balancing between multiple containers that contain multiple entity beans that represent the same underlying data.
The identity rule
If two entity bean instances have the same home object and the same primary key, then they are the same instance.
Primary key format
The developer of the bean creates the primary key.
It will have instance variables that are appropriate for storing the values that represent the primary key.
The key is tightly coupled to the bean it represents. It must be a legal RMI-IIOP type,
which means that it is serializable at the very least. The following MouseOver explains the structure of a primary key.