Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use return value of EJBFind method - I mean the collection

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reading my post.
all ejbFind methods return a collection or one ejb local ,
I do not know how to use that collection ?
is it correct to use toArray() and get an array of ejbLocal from the collection ?
or it is memory /resource consumer and we should use other methods ?
how i can access items of that collection ?

Thank you
 
Annie Smith
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by raminaa niilian:
Hi
Thank you for reading my post.
all ejbFind methods return a collection or one ejb local ,
I do not know how to use that collection ?


I think you should be reading this:
http://java.sun.com/docs/books/tutorial/collections/

(unless I misunderstood the question completely!)
 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
One of my question was about using Collection as i did not use them before
another question was about Using DTO pattern,
which i found some very useful reference for them :
http://www.oracle.com/technology/sample_code/tech/java/j2ee/designpattern/index.html

and
http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html

which i found more expressive .


Thank you again for collection link
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic