File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes SessionBean method accessing EntityBean in WSAD 5.0.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "SessionBean method accessing EntityBean in WSAD 5.0.0" Watch "SessionBean method accessing EntityBean in WSAD 5.0.0" New topic

SessionBean method accessing EntityBean in WSAD 5.0.0

Deepak Lohar

Joined: Nov 13, 2002
Posts: 14
Hi everybody,
* I have this method in SessionBean's remote interface as;
public Collection getAllReaders() throws java.rmi.RemoteException;
* I have the method in SessionBean implementation class which returns Collection ie;
Collection xyz = null;
public Collection getAllReaders(){
xyz = EntityHome.findAll();
}catch(FinderException fe){}
return xyz;
When i compile the project in WSAD 5.0.0 it indicates that
java.util.Collection must be serialized at run time ....
what does this mean exactly?
and what is the solution to run the application successfully

But when i execute the functionality of just the EntityBean alone without accessing it from the SessionBean, it executes and lists all the records of the method;
Remote interface for EntityBean:
public java.util.Collection findAll() throws javax.ejb.FinderException;
configured with a revelant SQL query ( select object(o)from Table o )
Any assisstance in this matter for;
whats the problem when i access this method from SessionBean
and the expected solution, will be of a great help

Kyle Brown
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
The warning is just letting you know that the implementation of the Collection interface that you use inside the Session bean (Remember, it can't see inside your method -- it only knows the signature of the method) must be one that also implements serializable since the EJB spec requires all method parameters and return values to be serializable.
Don't worry about it.

Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at for other WebSphere information.
I agree. Here's the link:
subject: SessionBean method accessing EntityBean in WSAD 5.0.0
It's not a secret anymore!