genekhart wrote:
I'm using XStream to send pojos from hibernate queries to a client over a socket. I think the only thing you have to worry about is that all your objects are initialized, and are not using lazy-loading.
I ensure that properties/collections are initialized, but now I wonder if the XStream serializer would actually trigger hibernate to initialize lazily-loaded properties/collections when calling getters, or if it uses reflection. I'm not using any special XStream converters, except for a custom date parsing converter which is unrelated.
Is your client aware of Hibernate jars? I'm asking because XStream put Hibernate classes names in the xml (e.g. PersistentBag for collections), and on client end it is not possible to deserialize this xml due to lack of hibernate jars