aspose file tools*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB lookup resolution" Watch "EJB lookup resolution" New topic
Author

EJB lookup resolution

Aryan Khan
Ranch Hand

Joined: Sep 12, 2004
Posts: 290

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


OCP/MCP/SCJP/SCWCD/IBM XML/SCMAD/SCEA-1
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB lookup resolution
 
Similar Threads
Problem with MSSQL SPRINTA 2000 JDBC Driver
I need help on applet crashing
help jboss
java.net.UnknownHostException
Cannot Start RMI Server