Bill Burke wrote:
> The reason I ask is that it seems all finders go straight to the
> Persistence manager with no optimizations in front of it. Couldn't
> "findByPrimaryKey" look in the EntityInstanceCache and avoid a DB, "does
> exist", call? Is this as easy as modifying
> org.jboss.ejb.EntityContainer.find(...) ?? You're safe if
> "findByPrimaryKey" has been overrided by the Bean developer because
> org.jboss.jeb.EntityContainer.setupHomeMapping will not map the finder
> to EntityContainer.find, but rather to the Bean class.
I think this is the right place to do it - I wouldn't want the
persistenceManager messing around in the cache (I had that at one point
with the collection finder optimizations and it just increased system
coupling with no performance advantage over what's there now (memory
usage advantage, however))
> At first glance,
> I can't find words stating that this optimization is illegal, although
> the Object Interaction Diagram does show a call to the database for
> ejbFind. Comments?
>
I don't see anything wrong with a cache look-aside before hitting the DB.
-danch
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development