Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JDBC and Firewalls  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone point me towards some resources on how to use JDBC to tunnel through a firewall. I'm particularly interested in knowing how I would structure the URL for the DriverManager.getConnection() statement.
Thanks
 
Sarath Madap
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As long as the host on which you are trying to make a connection from to the database has access to the database sitting behind the firewall, you do not have to do anything specific to get database connection.
For example: If you are using Oracles thin driver, this is how you make connection to the Database.
DriverManager.getConnection("jdbcracle:thin:@ipaddressofthedatabaseserver:portnumber:databasename", "username", "password" ) ;
Hope this helps.
-Sarath
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!