RMI and versioning

I have a client/server app that uses RMI to communicate. I have a few questions. I'm new to RMI so if what I'm asking doesn't make much sense, correct me.

I deploy the client and server. Now I update the remote interface to add new functionality by adding a new method, I thought that this would cause the old client to stop working, but the old client worked just fine. What changes would I need to make that would cause the old client to stop working?

And related to that, what is the best way to ensure that making changes to the remote interface will not affect old versions of the client? I read that subclassing the old interface and implementation of it and then binding both the old implementation and new implementation would work so that new clients can ask for the new one and old clients can still get the old one, but is there a better way to do it, like using the codebase or something?

Thanks

[935 byte] By [syt000a] at [2007-11-27 6:56:13]
# 1

I prefer the subclassing approach, but you don't have to bind both versions, just the newest one. Clients using the old interface will still work as it's just a downcast from the new version to the older version, and clients using the new interface will also work by the normal processes of RMI.

Or you can use the codebase feature or Web Start to distribute the entire client, in which there is no versioning problem.

ejpa at 2007-7-12 18:33:07 > top of Java-index,Core,Core APIs...