Somewhere between ejbActivate and ejbLoad the container associates the bean with a client. The same thing occurs after ejbStore() and before ejbPAssivate(). The entity bean is too general during activate and passivate to know about the client that is calling the business method. It has not been associated with a client or transaction.
According to the specification the primary key for the entity must be set before ejbCreate completes, Once that is done the primary key is available through getPrimaryKey method of EntityContext. There should be some way to communicate to the container what primary will be used for this entity. In case of CMP we have to do something like setId() (id is the primary key and a virtual persistence field). So when ejbCreate returns the container knows the primary key and we return null, In case of BMP there is no way the container knows what the primary key is and hence we need to return the primary key class and not null from the ejbCreate of BMP bean.