• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

EJB 2.0 - multiple finder methods

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Why does your bag say "bombs"? The reason I ask is that my bag says "tiny ads" and it has stuff like this:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic