This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes JDBC Driver Type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC Driver Type" Watch "JDBC Driver Type" New topic

JDBC Driver Type

PNS Subramanian
Ranch Hand

Joined: Jul 13, 2004
Posts: 150
In typical J2EE application, one similar to petstore, we use a DataSource object to lookup a database and goahead with the transactions. Isn't this a case of Type 3 driver being used ? Since the end-client always accesses the database through the app-server - let me know if otherwise.
satish sathineni
Ranch Hand

Joined: May 03, 2004
Posts: 46
Type 3 drivers are provided with the Application Server only i heard Weblogic gives the type 3 driver along with its application drivers are bundled with the server only....

I dont think ur case comes under Type 3 driver...

Even Type 4 drivers can also used to lookup the database using datasource....

u did not mention the application server name....

I think this should clarify ur doubts....

Satish Kumar
Software Engineer
PNS Subramanian
Ranch Hand

Joined: Jul 13, 2004
Posts: 150
The deails of usage are as below
Driver - Sybase Driver - jConnect (comes with Sybase client installation)
AppServer - BEA Weblogic 8.1
Backend - Sybase

Another case
Driver - DB2 UDB -
AppServer - WebSphere
Backend - DB2 UDB 7.1

Please note, in both the above cases, the end-client calls the AppServer which inturn uses a datasource to lookup and get connection to the backend.
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
Hi guys,

Please forgive me if this is hopelessly naive but, why would DB access via a DataSource object preclude (or imply) use of any particular type of JDBC driver? All 4 types can be called from Java code at the server side...

Ankur Srivastava
Ranch Hand

Joined: May 11, 2004
Posts: 62
Hi Julian

Ofcourse all 4 types of drivers can be called from Java code at the server side but DataSource implementation also provides you features like Connection Pooling, Distributed Transaction implementation, So you don't have to worry about that when writing your data access code.

I hope I have answered your question to some extent.

I agree. Here's the link:
subject: JDBC Driver Type
jQuery in Action, 3rd edition