jQuery in Action, 3rd edition
The moose likes EJB and other Java EE Technologies and the fly likes EJB lookup resolution Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB lookup resolution" Watch "EJB lookup resolution" New topic

EJB lookup resolution

Aryan Khan
Ranch Hand

Joined: Sep 12, 2004
Posts: 290


How is the servername resolution done for Remote EJB lookups.

I have an application which looks up an EJB. If I put the server name in host file it works fine. Oherwise it throws
this exception:
java.net.UnknownHostException: horebs03t
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)

The host is added to DNS server and can ping it correctly even while not defined in the host file.

Also the following code works fine without any entry in host file
URL url = new URL("http://horebs03t:2810/");

My questions is how is the resolution done for iiop:// ejb lookups? Why cant it query the DNS server?
Is it a must that I have an entry in the Host files


Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

It should work and use DNS to resolve the server name to ip address. What does your jndi.properties file look like?


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link: http://aspose.com/file-tools
subject: EJB lookup resolution
It's not a secret anymore!