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

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.
 
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic