----- Original Message -----
From: "Jonathan K. Weedon" <[EMAIL PROTECTED]>
> You say: "Now the code in performLimitCheck() could query the database
> directly, or work with a collection of EJBs. We don't really care at
> this point."
>
> Actually, I think you care very much.  If you do indeed work with a collection
> of EJBs (which I would assume are Account entities) then you will see the
> balance as defined after the withdrawal.

This is true. You *would* care greatly. Unfortunately, it is sometimes many
times faster to query the database to obtain this information than going through
the EJBs. For example, we are managing hierarchical relationships and we can
check the account balances of over 300 children accounts (note that children may
have children, etc.) in 10ms by issuing a single database query. However, to do
this by instantiating entity beans would take over 5 seconds. That also is
taking into consideration that ejbStore() in these entity beans doesn't make a
database call unnecessarily.

> I agree that if you try to do the validation in SQL, you will run into
> problems.  But if you stick to the EJB model, it will all work properly.

Sticking to the EJB model would cause a 500x slowdown every time we edit an
account!

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

Reply via email to