Re: NAT / Firewalls / Router / Grief

Gregg Wonderly <[email protected]> Wed, 12 Mar 2008 10:44:25 -0500
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
Cam Roe wrote:
> Just trying out River 2.1 and am working my way through some issues.  I 
> must admit to being very behind the times with regard to Jini after 1.2 
> so apologize if this has been gone over before.  

Hey Cam!  The thing that you need to look at is the Endpoint javadocs.  The 
SSLServerEndpoint has a getInstance() with the signature:

public static SslServerEndpoint getInstance(Subject serverSubject,
                                             X500Principal[] serverPrincipals,
                                             String serverHost,
                                             int port)

which allows you to spell out what host and port the "client" should use to 
connect so that your externally visible port forwarding configuration can be 
expressed in the serverHost and port arguments.  The TCPServerEndpoint class (as 
does the HttpServerEndpont) has a getInstance() with the signature:

public static TcpServerEndpoint getInstance(String host,
                                             int port)

which has the same effect.  I think these are the solutions you need for using 
these 2.1 JERI end points.  If you are use the JRMP stack, then you need to 
still use the system property, java.rmi.server.hostname I believe, but I don't 
use JRMP any more, so something may have changed that I don't know about.

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]