This is a very strange thing.
Are you sure???
Just describe what you have done. In the moment I can emagine two things:
1) You get a RMI-Object. Then everything is done in the server. So normaly you get a Session and in your Session you call a function.
->> doSomething is done at the Server!
2) You call a function, that returns an Object and then you call a Function on that Object.
--> getObject() is called on the Server. This call returns
an Object. Then this Object is on your client. On this local Object you are calling a function and this is (of course) called localy!
Maybe it's clearer if you divide it into parts:
MyObj obj = mysession.getObject(); // remote call
obj.doSomething(); // local Call - obj is a local Object
If you have done something different: Feel free to describe it and maybe I (or somebody else) could explain you, what happens.