Steve Muench wrote:

> What is the prevailing wisdom / best-practice for how a finder method like:
>
>    findTopFiveSalespeople()
>
> On a Salesperson Entity Bean would be implemented?

[snip]

> Is this effectively impossible without resorting to proprietary
> vendor extension to support the ANSI SQL92 standard query language?

Obviously in order for the finder to work in the first place you are
going to need to have the SalesPerson EB have their "sales figures" in
the first place. If you have that information, then the finder returns
the 5 in a Collection and you either sort it yourself in client code
(very, very simple if you write your own java.util.Comparator for a
List) or have a Stateless Session bean that does it for you. Pretty
trivial to do really isn't it.

I find it very frustrating that programmers get so focussed on one
particular tree that they forget to see the forest that they are
standing in. EJBs should be just one *tiny*  part of your toolkit for
the solving problems, not the only tool.

--
Justin Couch                         http://www.vlc.com.au/~justin/
Freelance Java Consultant                  http://www.yumetech.com/
Author, Java 3D FAQ Maintainer                  http://www.j3d.org/
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
                                              - Greg Bear, Slant
-------------------------------------------------------------------

===========================================================================
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