This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Return value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Return value" Watch "Return value" New topic
Author

Return value

Tmmet Johnson
Ranch Hand

Joined: Nov 03, 2004
Posts: 56
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

Joined: Sep 11, 2006
Posts: 959

Yes, you can because ArrayList is Serializable.


SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
I think you may to be sure that the objects in the ArrayList are also Serializable.


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
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.


Amit Tank
Linked In
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Return value
 
Similar Threads
about ejbcreate()
about ejbcreate()
Boolean Object in JSTL
How to use Session scope in jsp page
Form Beans and retaining values