Re: Service Versioning

Gregg Wonderly <[email protected]> Tue, 20 Nov 2007 10:29:10 -0600
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
Mike Morris wrote:
> (I don't much like the third possibility: "interface Foo2 extends Foo" 
> solution.)
> 
> What other approaches (presumably more clever stuff) have people taken?

If you add methods, you don't have a versioning issue.  If you change 
signatures, you can choose to add a method instead and mark the old as 
deprecated.  If you want to remove a method, mark it as deprecated and use
a smart proxy to throw an exception in any case that you can recognize a new 
version use of the service with an old version method invocation.

I will, many times, just copy all of the method signatures into Foo2 that you 
have above, and still have it extend Foo, but now I can eventually remove the 
extends Foo when I am no longer interested in it, and Foo's methods are already 
in the Foo2 javadocs etc.

Using interface subclassing, it really not a bad thing if you pick good names to 
start with and to continue with.

Gregg Wonderly

--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to [email protected]