wood burning stoves 2.0*
The moose likes JDBC and the fly likes Implementation of Interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Implementation of Interfaces" Watch "Implementation of Interfaces" New topic
Author

Implementation of Interfaces

sridhar lakka
Ranch Hand

Joined: Jan 02, 2007
Posts: 109
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

Joined: Nov 29, 2005
Posts: 2308
The implementation of those interfaces you can find in the driver jar of the respective database.


Rahul Bhattacharjee
LinkedIn - Blog
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

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.


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
sridhar lakka
Ranch Hand

Joined: Jan 02, 2007
Posts: 109
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

Joined: Nov 29, 2005
Posts: 2308
oracle.jdbc.driver.OracleDriver should be the one implementing Driver interface.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

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


OCUP UML fundamental and ITIL foundation
youtube channel
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

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)


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
sridhar lakka
Ranch Hand

Joined: Jan 02, 2007
Posts: 109
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
 
Consider Paul's rocket mass heater.
 
subject: Implementation of Interfaces
 
Similar Threads
can we creat an instance of an interface?
Design Pattern
confused with interface....
confusion in k&b page 118
Problem in understanding -how interface helpful