river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Firmstone <j...@zeus.net.au>
Subject Re: Compiling first example
Date Wed, 17 Aug 2011 02:52:09 GMT
Having a closer look Ivan's got the example from:

http://river.apache.org/user-guide-basic-river-services.html

I'm not sure how it's happened, but the example page appears to have 
some experimental code in it.


        Unicast

If we know where our Lookup Service is running, we can use unicast to 
connect straight to it.

LookupLocator ll = new LookupLocator("jini://localhost:4160");
StreamServiceRegistrar sr = ll.getStreamRegistrar();
System.out.println("Service Registrar: "+sr.getServiceID());

Assuming you don't get a |NullPointerException| and you do get a service 
ID written out, then your Lookup Service is running fine.

Change the code shown above to:

LookupLocator ll = new LookupLocator("jini://localhost:4160");
ServiceRegistrar sr = ll.getRegistrar();
System.out.println("Service Registrar: "+sr.getServiceID());

Hope this helps.

Anyone on dev know how I can edit this page to fix it?

Regards,

Peter.

Peter Firmstone wrote:
> Hi Ivan,
>
> Looks like you've got an experimental build there mate, (I haven't 
> implemented StreamServiceRegistrar yet!) please try our latest release:
>
> http://river.apache.org/downloads.html
>
> Along with the release documentation you might also find Jan 
> Newmarch's book helpful too:
>
> http://jan.newmarch.name/java/jini/tutorial/Jini.xml
>
> Best regards,
>
> Peter.
>


Mime
View raw message