A)
->jdbc application invokes getConnection() method on driver manager class to get the database connection.
Connection con= Drivermanager.getConnection(cs,”user”,”pwd”);
->here “cs” is connection string.
->when getConnection() method is called on Driver manager, that method internally calls Connect() method of driver object. Connection() method has client socket code to establish the TCP / IP socket connection with database server. Once connection is established connection() method creates java.sql connection object by encapsulation the socket connection. Connection() method returns the connection object reference to getConnection().
->in turn, it returns the same to the JDBC client. I.e. java client process connected to the database server process.
Comments
Post a Comment