[jboss-user] [JNDI and Naming] - Who should know how to locate server?

Egidijus Vaisnora do-not-reply at jboss.com
Fri Aug 27 04:00:37 EDT 2010


Egidijus Vaisnora [http://community.jboss.org/people/egiva] created the discussion

"Who should know how to locate server?"

To view the discussion, visit: http://community.jboss.org/message/559303#559303

--------------------------------------------------------------
I recently stuck with server configuration (behind NAT) issue ( http://http://community.jboss.org/message/559084#559084 http://http://community.jboss.org/message/559084#559084). I needed to configure RMI to replace server address in stub, then I needed to change JBoss remoting server locator parameters for EJB 3 to use remote IP. If I use JMS, I would need to change something more I guess... And all configuration I need to make on server side. But the fact is, that server doesn't know by which address it will be connected and by which address it is accessible for client. If I have server running behind NAT and it is supposed to be accessible from the remote and local network. Then I, probably, will have problems because local network could be configured to not see remote address, but +java.rmi.server.hostname+ property allows to specify only one address. Which one to use - local or remote?
With JBoss remoting it is better - you can define on server configuration many addresses which client should check if it can access. But does realy server should care about client task how to locate properly itself (server)?

In fact, client knows how to access server. For example, my code makes lookup for EJB and I am passing +server address+, which I know, I should be able to access. Hence I cannot understand, why, for example, code which receives RMI stubs from server cannot inline +server address+ (which was used to acces it on lookup by client) into stub ? Or why not to have JBoss remoting code on client side, which will make socket opening to the +address+ I used to connect to server (let say by lookup), instead of getting list of addresses from server and trying each in the list for accessibility.

Advantage - simple configuration. Actually there are no configuration, bacause that client uses everythere address which was entered by user.

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/559303#559303]

Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100827/47e71bf6/attachment.html 


More information about the jboss-user mailing list