If the original request was "Get me all employees", then the corresponding
find()
method in case of BMP might use one query
SELECT PKEY, FNAME, LNAME FROM EMP
to build the enumeration of primary keys AND entity bean for each employee,
which
will remain in cache until used by the caller.
Unfortunately, I did not have a chance to use commercial-grade app servers
(EJB containers), but from my experience with open-source servers (like
JoNAS)
it is more efficient to use BMP.
BTW, does anybody know of a good open-source EJB container?
Sincerely,
Max Loukianov
-----Original Message-----
From: Muly Oved [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 30, 1999 2:13 PM
To: [EMAIL PROTECTED]
Subject: Re: Doubts about Entity beans, Should we use them?
On Thu, 30 Sep 1999 12:30:06 -0500, Richard Monson-Haefel <Richard@MONSON-
>Wrong. There is nothing that says BMP is less efficient then CMP at run
time. It may take more
>time develop (unless using something like CocoBase) but there is no reason
why it would be less
>peformant. Containers can do optimizations like caching but this is vendor
specific.
SELECT FNAME,LNAME FROM EMP
BMP will generate:
SELECT PKEY FROM EMP
And then for every record in the table
SELECT FNAME,LNAME,ADDRESS,... FROM EMP WHERE PKEY=?
It is much more complicate (if possible) to a container to optimize this
select. CMP continer or some other tool can do by far better job in optimize
the original request.
I may be wrong but I fill BMP is a dead-end for future optimization. (vendor
specific but critical)
cache in the application server is also not the answer as the database may
be shared and there still need to retrive the full list of primery key.
Also the database is doing caching much better any way.
The key point here, as I understand, is that CMP or other tool can do much
better job. if not today maybe in the future, but BMP code will not be able
to enjoy this improvment.
===========================================================================
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".