This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implementation of Interfaces

 
sridhar lakka
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Thanks a lot in advance.
In java.sql package, we will have almost all are interface like Connection, Statment, ResultSet.
In normal JDBC program we will use directly those interfaces and methods, But where we have the actual implementation?
I have seen rt.jar also, which is contaning just interface, but where is implemented one.

Regards
Sree
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The implementation of those interfaces you can find in the driver jar of the respective database.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If at all you don't find the actual source files, try getting the source files ('src' - general term everyone follow) from the respective database driver vendors.
 
sridhar lakka
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for your reply.
However, without setting any classes12.jar or any other jar file a normal JDBC code which uses JdbcOdbcSriver will works fine?
And I tried by extracting the classes12.jar file clasess, there I could not find any implementation, please tell me the exact name of the class which is implemented.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oracle.jdbc.driver.OracleDriver should be the one implementing Driver interface.
 
Jan Cumps
Bartender
Posts: 2586
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
However, without setting any classes12.jar or any other jar file a normal JDBC code which uses JdbcOdbcDriver will works fine?
Yes. It will work.

Prefer to use the vendors driver if it's available.


Regards, Jan
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sun don't recommend you use the JDBC-ODBC bridge for much:

The JDBC-ODBC Bridge driver is recommended for use in prototyping efforts and for cases where no other JDBC technology-based driver exists. If a commercial, all-Java JDBC driver is available, we recommend that it be used instead of the Bridge.

(from Sun's JDBC docs)
 
sridhar lakka
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for replies,
However, Where I can find that Implemented class if it allows with normal JdbcOdbcDriver.
I have seen by extracting ojdbc14.jar file.

Regards,
Sreedhar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic