The Bean Provider must specify the primary key class for an entity bean with bean-managed persistence, and may (but is not required to) specify the primary key class for an entity bean with container-managed persistence.

For a CMP bean, the PK can be inferred from the findByPrimaryKey method.