What is difference between JDBC providers and Data Source in websphere ?

Questions by kirankumar samudrala   answers by kirankumar samudrala

Showing Answers 1 - 6 of 6 Answers


Steps for connecting to the database using JDBC:-

#1 Using Driver Manager:-
a.Load the driver class using class.forName(driverclass) and class.forName() loads the driver class and passes the control to DriverManager class
b.DriverManager.getConnection() creates the connection to the databse


#2 Using DataSource:-
DataSource is used instead of DriverManager in Distributed Environment with the help of JNDI.
a) Use JNDI to lookup the DataSource from Naming service server.
b) DataSource.getConnection method will return Connection object to the database

Regards
Anil Kommalapati

  Was this answer useful?  Yes

Thirupal

  • Nov 5th, 2014
 

JDBC providers:it is the actual implementation of driver class to access the different database types.
Data source: It is associated with JDBC provider to get connected with the database.It is normally use for connection purpose.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions