This is essentially correct in most cases Peter. Then the question comes
down to how many users can share the same cache!
Dave
David Brown
Technical Director, Western Operations
GemStone Systems, Inc.
(760)510-2754
[EMAIL PROTECTED]
www.gemstone.com
-----Original Message-----
From: Peter Delahunty [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 27, 2000 8:58 AM
To: [EMAIL PROTECTED]
Subject: How does Entity bean caching work
The way i see it with entity beans you are always going to the database at
least once each time you need and EB. This is presuming i never keep a
reference to the EB remote interface and i always call findByPrimaryKey
For example:
Suppose i had a servlet making calls to an EB.
1. The first time the servlet is run i call findByPrimaryKey on the home
interface of my EB.
2. this then calls ejbFindByPrimaryKey which makes a call to the database to
validate the PK
3. if it is there i get the remote interface returned and EB instance is
created and cached.
however
4. the next time the servlet runs i call findByPrimaryKey again on the home
interface of my EB
5. this then means another call to ejbFindByPrimaryKey and so a call to the
database to validate the PK
6. i get the remote interface returned, and the eb that was cached is used
to handle calls.
Is this right ? or on the second call to findByPrimaryKey does the container
realise that the EB is cached an so does not call the ejbFindByPrimaryKey
method which means not calling the db a second time.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".