i am new to the EJB world, i created a sample entity bean which is accessed through a stateless session bean. it seems like everytime i called the findByPrimaryKey method on the entity bean, it created a new instance of the bean even i called findByPrimaryKey with exactly the same key. is it normal, or i did something wrong. coz, why does the container create new instance of the bean everytime instead of reusing the same instance to save memory? can somebody clear this out for me? thanks in advance.
Calling findByPrimaryKey results in the invocation of ejbFindByPrimaryKey, which returns the primary key type. This is not the same as a bean instance. The primary key maps to a either a single field or multiple fields in the entity bean class.