Hi,
If it is just a lookup based on some selection, it need not be inside CMP. It
is not a no-no if performance is acceptable i.e.
you have resources to support the operatio within fraction of second, and you
know the growth rates wont kill your infrasrtucture.
The answer changes if you update the price( in database) based on the
information you gather for example quantity or inventory status.
I believe such operation( look up on large amount of data) should be outside CMP
in any case for scalability issues.
I guess the other thread going on data access should be able to quite
applicable to this question as well.
--Ashish
"Rhodes, Phillip C." <[EMAIL PROTECTED]> on 09/19/2000 05:10:16 PM
Please respond to A mailing list for Enterprise JavaBeans development
<[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (bcc: Ashish Joshi/AmericanRe)
Subject: Lookup price for each product design question?
struggling with this question...thanks.
Currently, I have 2 cmp entity beans 1)Price 2)Product
The product can have several prices associated to it (based upon date range
and who is the customer).
I need to display a list of products. Each product would have it's
associated price displayed. In my current implementation, as I loop through
my product enumeration I do a price lookup for each product. My question is
that is this horribly inefficient? A no-no?
Please let me know if it is a no-no or if it is okay.
Another approach would be to create another Entity Bean called ProductPrice
which would represent the join between the two objects. Looking for
recommendations
Thanks.
Phillip
Phillip Rhodes
[EMAIL PROTECTED]
Alcoa eCommerce
https://www.ALCOADIRECT.COM
826B Two Allegheny Center Pittsburgh, PA 15212
(412) 553-4900 (phone) (412) 553-2484 (fax)
===========================================================================
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".
===========================================================================
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".