Does a RemoteObject method’s return object has to be a serializable?
For example, A is a remote object and has the function:
SomeObject getMyObject() throws java.rmi.RemoteException
does SomeObject have to be serializable?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well according to the docs it should be:
http://docs.oracle.com/javase/1.5.0/docs/guide/rmi/spec/rmi-objmodel7.html
And this makes sense. The Object should transmitted from one node to the other. In order to be transmitted, it should be placed in a socket (at some point), so it should serialized.