----- Original Message -----
From: "Herbers, Joe" <[EMAIL PROTECTED]>
> Yes to two points above: can't rely on dbIsShared for performance
> even in non-clustered systems. If you have things like DB triggers
> then you can't use dbIsShared=true (right?) Then even in your
> non-clustered WebLogic server, you're going to take a big perf hit.
DBShared (Option A in EJB spec) is typically a poor modeling choice. It is
very difficult to predict what resources your application may need in the
future.
> And *yes, this does affect your code*. We've seen that if
> people coded a sess bean to create a new EB and then call all the
> setters to define the content that the performance is terrible
> because the EB hits the DB for each setter. If you thought the
> EBs were caching, then you didn't worry. And there seems to be
> a similar issue with getters, meaning an even greater impact.
There may be more to your design than you have elaborated, but the symptoms
that you believe you are seeing have nothing to do with the use of entity
beans. All setters called from a single entry point in a session bean will
execute in the same transaction, and ejbLoad will only be called one time on
the entity bean. If you are seeing behavior other than this, it is most
likely a design failure, or improper use of RequiresNew on the entity bean's
methods.
> Seeing this now, we're wondering why we used EBs at all - we've
> started converting things over to sess beans using JDBC to
> the DB to avoid this bad performance (and also because of things
> like EB finders being too limited resulting in us iterating over
> EBs which is also very slow). Any other solutions for these
> issues with WebLogic EBs?
There is nothing inherently wrong with bypassing entity beans and sticking
with session beans only. You may have duplicated emthods and business rules
scattered among multiple session beans, and increased trouble managing
concurrency. Entity beans have their place, and when used properly, they
work well.
We have to prepare ourselves for more "bad juju" regarding entity beans.
They are frequently considered a bottleneck in the EJB spec, requiring more
and more hardware to run fast. In truth, a well-designed approach to using
entity beans can result in a very fast application. When used properly, they
*do* scale well. We just have to do a better job at educating people how to
design better.
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".