Robert,

you need to look carefully at the life cycle definition for entity beans. An entity
in the pool is not associated with any data. The association happens at the begin of
a transaction, that is ejbLoad(), at the end of the transaction the data is written
back into persistence storage (ejbStore()), the entity returns to the pool and looses
the association with the data. The next client goes through the same cycle. The
advantage of the approach is data integrity, the disadvantages is performance
overhead. A container may do clever things when CMP is used.

Cheers,

Andreas

Robert Krueger wrote:

> Andreas Vogel wrote:
>
> >
> > Entity beans are specifically targeted towards transactions. Caching is a value
> > add of CMP implementation BMP prevents you from caching.
> >
>
> Why would that be? I thought a container could keep entity bean data in
> memory no matter if CMP or BMP? My understanding was that say client 1
> requests an entity bean instance with PK x which is not in main memory.
> It is retrieved from the DBMS (CMP or BMP) and instantiated in main
> memory. Then client 2 also requests the entity with PK x, which then may
> still be in main memory. Where is the difference between CMP or BMP
> here? It may very well be that I'm misunderstanding the spec as I am not
> an expert. Could you please enlighten my on that point as it seems to be
> a very important factor in designing an EJB application using entity
> beans with BMP with acceptable performance.
>
> Thanks,
>
> Robert
>
> --
> (-) Robert Kr�ger
> (-) SIGNAL 7 Gesellschaft f�r Informationstechnologie mbH
> (-) Br�der-Knau�-Str. 79 - 64285 Darmstadt,
> (-) Tel: 06151 665401, Fax: 06151 665373
> (-) [EMAIL PROTECTED], www.signal7.de
>
> ===========================================================================
> 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".

--
"Programming with Enterprise JavaBeans, JTS and OTS" is now available. Collect all
three!
www.wiley.com/compbooks/vogel

begin:vcard
n:Vogel;Andreas
tel;fax:+1 650 655 3950
tel;home:+1 415 643 8827
tel;work:+1 650 358 3037
x-mozilla-html:TRUE
url:http://www.wiley.com/compbooks/vogel
org:Inprise Corp.
version:2.1
email;internet:[EMAIL PROTECTED]
title:Strategic Technology Adviser
adr;quoted-printable:;;951 Mariners' Island Blvd.=0D=0ASuite 120;San Mateo;CA;94404;USA
x-mozilla-cpt:;-6336
fn:Andreas Vogel
end:vcard

Reply via email to