File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
 
subject: Return value
 
Similar Threads
about ejbcreate()
How to use Session scope in jsp page
Boolean Object in JSTL
about ejbcreate()
Form Beans and retaining values