Hi,
http invoker uses ObjectInputStream on client and server to
deserialize classes. This class relies on a complicated scheme - that
apparently isn't documented? - to get a class loader to load the class
that has to be deserialized but there is no way you can specify a
specific class loader. Specifying a specific class loader is for
example required if a class that's being transported is dynamically
generated both on the server and the client.
It would be nice if Spring would use its own sub class of
ObjectInputStream that overwrites the resolveClass method so that the
class loader found in Thread.currentThread().getContextClassLoader()
is used. This would allow setting a custom class loader through AOP.
Steven
|