• 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

Return type of finder

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have one question on return type of EJB's findr methods.
Speciication says, you ejb's finderMethods may return java.util.Set which will not contain suplicates and will return the unique result set as compared to java.util.Collection.

But i am trying one finder query ,in which if i use collection as return type is works fine,but if for the same query if i use Set it gives me ClassCastException.
The EjbQL which i have written is a simple select query.

So can you tell me whats going wrong .
And please suggest some links which will educate me more on return type of entitybeans.
 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

It would be helpful if you could attach the code, but I do not think this to be a Set/Collection issue, but something to do with casting during runtime.
Please check if you are casting an object into some other type.
reply
    Bookmark Topic Watch Topic
  • New Topic