I have a stateless session bean. It uses a local interface to retrieve Entity Bean instances into a Vector. I then use a Java client program to access the Session Bean method that returns the Vector. When I run the client, I get an error that the Vector is not serializable. Shouldn't this work?
It's not the Vector itself, it's what's in the Vector. Are you trying to put LOCAL references from Entity beans into the Vector and return that? Of course that won't work... Think about it -- that's why they're local references... In any case, you shouldn't return Entity bean instances directly from a Session bean. The best practice is to create Value Objects from the information in the Entity beans and then return those in the Vector. Kyle
Kyle, Thanks for the help. I guess I should have known better. (If it helps, I did get a copy of your book! - I suppose I just need to read it thoroughly).
Argh -- actually it won't help -- my book is on WebSphere 3.5 and you're working with 5.0... my new book on that topic won't be out until next year... Kyle