• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB 2.0 - multiple finder methods

 
J Waldinger
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a finder method in an EJB that can return multiple results. However, the finder method's return type is the local interface - not a Collection.
This worked fine when the code was running in an EJB 1.0 container, but now that it has been upgraded to EJB2.0, it is breaking when more than one record comes back from this finder query.
Do I need to change the return type to Collection and then modify all the calling classes accordingly? Or is there some other way to get around this?
Thanks much,
Jamie Waldinger
 
Juan Rolando Prieur-Reza
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by J Waldinger:
Hi,
I have a finder method in an EJB that can return multiple results. However, the finder method's return type is the local interface - not a Collection.
This worked fine when the code was running in an EJB 1.0 container, but now that it has been upgraded to EJB2.0, it is breaking when more than one record comes back from this finder query.
Do I need to change the return type to Collection and then modify all the calling classes accordingly? Or is there some other way to get around this?
Thanks much,
Jamie Waldinger

Surprising that it worked in EJB1.0. My humble opinion is that
your solution is the only way to go.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!