aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Practical use of an ejbselect method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Practical use of an ejbselect method" Watch "Practical use of an ejbselect method" New topic
Author

Practical use of an ejbselect method

Julien Martin
Ranch Hand

Joined: Apr 24, 2004
Posts: 384
Hello,
I understand ejbFindXX methods are used by ejb clients whereas ejbSelectXX methods are used by the ejb itself. Is that the difference? Can anyone give me a practical example/use of an ejbSelectXX method?
Thanks in advance,
Julien Martin
[ May 02, 2004: Message edited by: Julien Martin ]
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
ejbSelect provides a more flexible method to query the database than find methods. Find methods belong to a home interface and only return the corresponding local object. A findFoobar method in StudentHome can only return a Student or a collection of Students. ejbSelect methods can return any type in the database or a collection of database objects. They are restricted to the entity bean implementation class; you'll need to write a separate business method to expose the results of the query.


Kishore
SCJP, blog
Julien Martin
Ranch Hand

Joined: Apr 24, 2004
Posts: 384
Thanks,
Julien.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Practical use of an ejbselect method