title: RMI: serializable and remote objects
body: <p>I have a certain problem: I'm using RMI to communicate between server and client. </p>
  
  <pre><code>public class RemoteMap
      extends java.rmi.server.UnicastRemoteObject
      implements RemoteMapInterface {
  
   private TreeMap&lt;String, GeneralSprite&gt; sprites;
  ...
  </code></pre>
  
  <p>This is my remote object. But I want the client to be able to change this object's content. And after the change the server can execute some operation based on this.</p>
  
  <p>Example at the client side:</p>
  
  <pre><code>map = (RemoteMapInterface) (registry.lookup("map"));
  map.getSprites.get("object1").setDx(-1);
  </code></pre>
  
  <p>I'm using serialiable on the GeneralSprite, but I guess it passed by value. So when I did some changes at the GeneralSprite, it wasn't transported to the server . Do I have to make GeneralSprite to an Remote object too? Or is it even possibly?</p>
  
  <p>Thanks in advance, and sorry for my bad english, I hope you can understand.</p>