• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SessionBean method accessing EntityBean in WSAD 5.0.0

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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(){
try{
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
thx
Deepak
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic