• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Database connectivity taking too much time

 
Tapas Chand
Ranch Hand
Posts: 533
8
BSD Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using jdk 1.5, oracle 9i, IBM AIX 5.3, classes12.jar
my code is like this

connection is getting established after almost 5 mins.
but when i am connection through sqlplus from commandline, connection is getting established instantly.

please help...
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Try this


 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34695
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you closing the connection in a finally block when done with it? Maybe there is a resource leak? Also, why are you checking if connection is null? If you are trying to reuse the connection try using an open source connection pooling library to do so more effectively. (And a datasource rather than driver manager)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic