Calum, apologies for not responding earlier.
On Wed, 23 May 2007 17:49:44 +0100, Calum Shaw-Mackay wrote: >> (svn co, mvn install) or unzip, run. Anything else is "not good enough". >> Make it easy to develop (in an IDE), easy to build and easy to test! > > How does the following sit with you...... I should have clarified - I was talking mainly about easy development of River itself, not client apps (yet). In fact with Spring's javaspaces module that issue is mostly moot (IMHO). I'm still a Jini/JavaSpaces newbie but have been using the module to rewrite the JavaSpaces connector for Mule (http://mule.mulesource.org) against GigaSpaces as reference implementation while still retaining full vendor independence, and so far that has turned out to be very easy because of the dramatically simplified lookup procedure. My first trial - similar to your client below - took not much more code but did not require custom annotations or other assorted trickery. > package glyph.test.simple; > > import java.rmi.RemoteException; > > import net.jini.core.lease.Lease; > import net.jini.core.transaction.TransactionException; import > net.jini.lookup.entry.Name; > import net.jini.space.JavaSpace05; > > import org.jini.glyph.Client; > > public class TestClient { > @Client > public void writeMyEntry(JavaSpace05 myspace){ > try { > Name ne = new Name("Joe Bloggs"); > myspace.write(ne, null, Lease.FOREVER); > } catch (RemoteException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } catch (TransactionException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > } > } > } > This is all you need to be a client to a JavaSpace and write an > entry....This is on the issue of making the IDE do the hardwork, or having > the compiler do the hardwork so you dont have to... I think I understand what this code and the annotation does, but at least to me this looks like a perfect example for how and why not to use annotations. :-) regards Holger
