Extended a Serializable Class, how to use in Remote-Calls?

Unless your server can get to know about your specialized classes via a jar in the classpath, you won't be able to have it unserialize your classes.

The server obviously can't reconstruct my serialized implementations, because he doesn't know my specialized classes. Unless your server can get to know about your specialized classes via a jar in the classpath, you won't be able to have it unserialize your classes. Creating proxies could be an angle to explore, but with no guarantee this would work (not enough details about your specific situation).

An easier solution is to use a root class for your beans, containing or extending a hash map and store the properties/values in it. Instead of creating getter and setter for each property, implement only one pair and provide the property name as a string. The server won't have any issue to unserialize it, unless one of the Serializable object in the map is unknown to the server.

This method allows you to add any extra bean information in it and the server will always know how to deal with it. There is also a trickier angle you could try. The class Class is serializable by itself.

Therefore, if you transferred it before you transfer your beans, may be the server could learn about it first. I have never tried this myself, so I don't know if it would work. Just an idea.

Proxies don't look like they'd work for this. Regarding hash map properties: the point is some of this information in the specialized version should be kept private and not transmitted in the remote call at all. It's not only the issue of the server being unable to reconstruct objects.

I guess i'll just stick with a set of export() methods that clones each object into an instance of it's respective super type. – MisterD May 8 at 7:31 In that case, copy constructors are the easiest. – JVerstry May 8 at 12:19.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions