"Jonathan K. Weedon" wrote:
>
> > Now the doubt is how do I create new entity bean, I don't think I can do new
> > MyBean(), is there anyway using EJBHome or EntityContext I can achieve this.
> > If this is not possible, isn't the Entity Bean concept has some serious
> > performance problem, where as the traditional jdbc program can do this is in
> > one query?
>
> Ben,
>
> I just wanted to point out that the problem is due to your trying to use
> BMP to implement your entity beans.  The optimization that you suggest
> (loading all the beans with a single SQL statement) is provided by many
> CMP engines.  It just can't be done in a portable fashion using BMP.

If the finder method runs in one transaction, and the business methods on the
returned entities occur in one or more separate transactions (separate from
the transaction for the finder call), CMP-based caching of finder results can
either be dangerous (giving stale data) or not particularly useful (if you
have to call ejbLoad again) or OK (if you have a transactional cache).

> Don't throw out the baby with the bath water: CMP Entity Beans can have
> excellent performane.  It is just BMP Entity Beans which have these
> performance limitations.

CMP can have the same performance limitations, unless you cut some dangerous
corners or you have a fairly complex CMP caching architecture which can
guarantee that the optimizations do not result in the use of stale data for
update transactions.

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

--
________________________________________________________________________________

Evan Ireland              Sybase EAServer Engineering        [EMAIL PROTECTED]
                            Wellington, New Zealand               +64 4 934-5856

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