Evan,

I certainly never meant to suggest that implementing a high performance
CMP engine is trivial.  Clearly it is not, as is evidenced by the fact
that some of the leading products haven't even come close yet.

As you say, a correct CMP engine needs to respect transaction boundaries.
There are many ways to slice this: transctional caches will probably be
the most effective for frequently modified data, whereas non-transactional
caches which rely on optmistic concurrency checks will often perform
better for read-mostly data.

As you say: "CMP can have ... performance limitations unless you cut some
dangerous corners or you have a fairly complex CMP caching architecture."
That is, if you don't do things properly, you will either have terribly
slow CMP behavior, or incorrect CMP behavior.  (Or, in the case of one
leading vendor, both.)  So yes, you have to do it right, to make it fast.
But the correlary is that if you do take the time to do it right, it will
be fast.

-jkw

Evan Ireland wrote:
>
> "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".

Reply via email to