> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Oren Dean

> In case of a BMP entity bean (1.1), must the container invoke the
> ejbFindByPrimaryKey method evey time the client invokes
> findByPrimaryKey on
> the home object, or can it skip it if the bean is already in its cache?

It is a common mistake to think that EJB implies a "cache". The only thing
that resembles a cache are beans deployed with commit option A.

> The reason I'm asking is that it occurred to me that weblogic 5.1
> does this
> optimization, but I couldn't find anything on the spec. that specifies
> whether it is allowed or not.

How do you know it is not calling FBPK? If you put a log statement in FBPK
and ejbLoad, you will typically see at least one or both of these fire,
unless you are using commit option A.

Again, WebLogic will call FBPK each time the bean is used in a transaction.
Some EJB containers (and perhaps WL5.1 is one of them), will optimize access
to a bean by skipping the FBPK and directly calling ejbLoad instead. I have
some technical issues with this that can cause some insideous portability
problems, but it is a common option.

jim

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