Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB lookup resolution

 
Aryan Khan
Ranch Hand
Posts: 290
Java Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

Thanks
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should work and use DNS to resolve the server name to ip address. What does your jndi.properties file look like?

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic