Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection to Database thru JDBC driver is doing a DNS Lookup

 
Anusha verrma
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application coded in Java which checks the oracle database if any new record is added.
so the line of code for eastablishing the conection is :
java.sql.Connection conn = DriverManager.getConnection ( "jdbc racle:thin:@10.3.7.197:1521 EV", "lot3","lot3" );

the application checks the database every 2 mins for any new records.
everytime the appln tries connecting to the DB, it is doing a DNS lookup. IS there any way to stop this DNS lookup?
the appln is running on AIX Unix machine.
Can anybody please help me?

otherwise, can anybody please tell me whether Connection to Database thru JDBC driver really does a DNS Lookup always....
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not very sure but JDBC driver does not make a DNS look up unless you use a host name in your URL.

The connection string posted by you is using an IP address for creating connection, so I dont think it will be looking for DNS. Might be there is another piece of code is doing DNS lookup.

Is there any problem you are facing because of this

Shailesh
[ May 11, 2006: Message edited by: Shailesh Chandra ]
 
Anusha verrma
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am not facing any problems as such, but clients are finding it as a bug and they don't want it to happen.
so i need to somehow stop this DNS lookup.
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, but how did they identify there is a DNS lookup ? I am not quite sure about it?

Shailesh
 
Anusha verrma
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i used this command :
" tcpdump -p dst port 53 "
then, i cud see the number of dns requests being sent.
It can also be found by the log on the dns server.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic