• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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.
 
Every plan is a little cooler if you have a blimp. And a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic