Sowmya said:

*       So, if ejbFindByPrimaryKey is going to call ejbLoad() ( and in turn
refresh() )
*       then why should I call refresh() in the ejbFindByPrimaryKey() method
also?

According to Valesky's book, "...finder methods are invoked on beans that
are in the pooled state; thus, when you're implementing a finder method, you
shouldn't try to access the object's state."  (Likely) another bean will be
activated and do the ejbLoad. Monson-Haefel's book says the same thing but
then gives an example where the ejbFBPK method does (the equivalent of) a
refresh. I'd like to think Valesky's approach is correct.

Valesky gives a BMP ejbFBPK example where the query is checking for
existence (count(*)), and not actually retrieving data. So your ejbFBPK
method should not  be calling refresh(), imho.

John Finlay, Enterprise Architect
Applied Technology Research (ATR) Group
EDS Systemhouse, Inc.

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

Reply via email to