Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Practical use of an ejbselect method

 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks,
Julien.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic