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".