Hi,
I have a problem with object serialization.
I have a remote object A which contains a vector. It implements remote interface C, which contains a single method that returns this vector to the client side. Class A also has a setVector method that allows a server side class B to update the vector content. So the client always gets a fresh copy of the vector modified by class B when it invokes the remote call.
Everthing goes well before class B calls the setVector method. However, after class B calls setVector method to update the vector, an exception is thrown when the client invoke the remote call. This exception says class B cannot be serialized. But I only return the vector that is modified by class B to the client side, not any instance of class B.
What is wrong with it? It works fine with CORBA. But why Java RMI doesnt like it?
Thanks.
I have a problem with object serialization.
I have a remote object A which contains a vector. It implements remote interface C, which contains a single method that returns this vector to the client side. Class A also has a setVector method that allows a server side class B to update the vector content. So the client always gets a fresh copy of the vector modified by class B when it invokes the remote call.
Everthing goes well before class B calls the setVector method. However, after class B calls setVector method to update the vector, an exception is thrown when the client invoke the remote call. This exception says class B cannot be serialized. But I only return the vector that is modified by class B to the client side, not any instance of class B.
What is wrong with it? It works fine with CORBA. But why Java RMI doesnt like it?
Thanks.