Sergei,
I ran
into this problem once before...sorry about the performance, I didn't know how
big your beans were.
What I
did was create an entity bean which was just the list of pk's for the other
bean...I mean that's all. Then call the list, findByPK(1), and return the list
of pk's from directly in the enitity bean. Although you had one more bean, it
was only one more, not n more. This will fly. Each time you create a new entity
bean (the big bean), do a business method for the lite bean, addOtherPK(xxx).
Then when you need the list of pk's, or the number, have a business method,
getMyPKS(), and this will return a collection of only strings or integers or
bigs or whatever.
I used
this stratagy with a chemical component list. It was important to list the
molecular weight, name and boiling point on the web, but on the enterprise tier,
we needed to know individual properties for each component (critical properties,
vapor pressure curves, you name it). Using a find on the heavy bean was TAXING
our server. We created another bean, whose only purpose was to keep the mw, name
and bp as a LIST.
This
really speeded things up.
Hope
this helps.
Regards,
the
elephantwalker
|
- Counting CMP entities Sergei Batiuk
- RE: Counting CMP entities elephantwalker
- Re: Counting CMP entities Russ White
- Re: Counting CMP entities Sergei Batiuk
- Undeliverable: elephantwalker
- Undeliverable: Mail Delivery Subsystem
- RE: Counting CMP entities Jeff Schnitzer
- Undeliverable: Mail Delivery Subsystem