be happy to if I get cvs access. --Marc, is that possible to get?
in the meantime this is the code that I was talking about: go ahead and
check it in if you have time...
Pasted in at the top of CMPPersistenceManager.findEntity it seems to do the
trick.
thanks
dave
// Check if findByPrimaryKey
// If so we check if the entity is in cache first
if (finderMethod.getName().equals("findByPrimaryKey"))
{
Object key = ctx.getCacheKey();
if (key == null)
{
key =
((EntityCache)con.getInstanceCache()).createCacheKey(args[0]);
}
if (con.getInstanceCache().isActive(key))
return args[0]; // Object is active -> it exists -> no need to
call finder
}
-----Original Message-----
From: Bordet, Simone [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 12:44 PM
To: 'jBoss'
Subject: RE: [jBoss-User] RE: Why doesn't CMP findByPrimaryKey lookup on
c ache?
I'll commit this in few days, unless you can do that before.
Thanks
Simon
> -----Original Message-----
> From: Castro, David [mailto:[EMAIL PROTECTED]]
> Sent: martedì 13 febbraio 2001 16:59
> To: 'jBoss'
> Subject: [jBoss-User] RE: Why doesn't CMP findByPrimaryKey lookup on
> cache?
>
>
> BTW, I pasted the code directly from
> BMPPersistenceManager.callFinderMethod
> into CMPPersistenceManager.findEntity, and it works very
> well, giving nice
> performance improvement.
>
> -----Original Message-----
> From: Castro, David
> Sent: Tuesday, February 13, 2001 9:50 AM
> To: 'jBoss'
> Subject: Why doesn't CMP findByPrimaryKey lookup on cache?
>
>
> We have code in BMPPersistenceManager to check the instance
> cache on a find
> by primary key before hitting the database. (ie. callFinderMethod ->
> cach.isActive). It seems as though the same code would work
> wonderfully for
> CMPPersistenceManager, but I cant find the subject discussed
> at all. Am I
> missing something??
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> List Help?: [EMAIL PROTECTED]
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]