Hey Rickard,

it should be:

public boolean isActive(Object id)
{
        // Check whether an object with the given id is available in the
cache
        boolean isActive;
        synchronized (getCacheLock())
        {
                isActive = getCache().peek(id) != null;
        }
        return isActive;
}

Best Regards,

Simon


> -----Original Message-----
> From: Rickard �berg [mailto:[EMAIL PROTECTED]]
> Sent: venerd� 1 dicembre 2000 14:10
> To: jBoss
> Subject: Re: [jBoss-User] findByPrimaryKey performance
> 
> 
> Hi!
> 
> "Keith L. Musser" wrote:
> > FYI:  I got a very significant performance boost when I put "finder"
> > results into my BMP caching system.  I would expect the performance
> > boost to be even greater when you put it into the JBoss 
> system, since it
> > would avoid a few layers of the call stack as well as the 
> DB hit in my
> > "ejbFind" method.
> 
> I have added a fix to CVS now for this. 
> 
> Here is the fix details:
> * Added isActive(pk) method to cache interface
> * The current cache implementation does getCache().peek(pk)
> * The BMP persistence manager checks if the finder method 
> being invoked
> is fBPK. If so it uses isActive on the cache to determine if the pk is
> in cache. If so the ejbFBPK call to the EJB instance is avoided.
> 
> That should be all. I have not been able to test this, so if you can
> confirm that this works as intended, let us know.
> 
> /Rickard
> 
> -- 
> Rickard �berg
> 
> Email: [EMAIL PROTECTED]
> 
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
> 

Reply via email to