• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Return value

 
Tmmet Johnson
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am new to EJB.Can anyone say me whether I can return ArrayList from my bean method ?
That is, all my input and output parameters of my bean method must always be serializable objects ?

Thanks in advance,
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can because ArrayList is Serializable.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you may to be sure that the objects in the ArrayList are also Serializable.
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not necessarily if you are using Local EJBs. Remote EJBs are extension of RMI and if your objects which are not serializable or Remote in nature then there can be issues at runtime.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic