One of the ways a bean transitions from "Pooled State" to "Method Ready State" is through ejbActivate() and you have access to getPrimaryKey() method but you can not use the setters and getters until the ejbLoad() method callback.
Here is what happens
1. Client calls a business method. 2. The container sees that it, does not have the bean instance for that entity in "Method Ready State" 3. It takes an instance from the pool. 4. Assigns the EJBObject(Context) to bean instance. 5. calls ejbActivate() , now you can acess the primaryKey of the Object instance. 6. Container loads the data from the database and sets the instance fields of the bean. 6. calls ejbLoad().