1 Reply Latest reply on Jan 3, 2007 6:49 AM by Chris Milburn

    EJB2 findByPrimaryKey caches sometimes but not others.

    Chris Milburn Newbie

      We have two entity beans that are accessed via their findByPrimaryKey methods. Both beans have the same container configuration and are executed 10 times within a single transaction.
      By turning on CMP tracing we can see that for the first bean one line of sql is executed against the database (ie the container is caching - as expected) for the second bean 10 lines are executed ?, what could cause this ? ie how does the container decide when not to cache an entity bean that is looked up by pk ?