Are You Recruiter/Hiring Manager?
Cloud-based Candidate Screening | Online Tests
PMP 1600 Questions
PMP 1600 Questions
1600 PMP mock questions 1400 CAPM mock questions 800 SCJP 6 mock questions 600 OCAJP 7 mock questions 590 OCPJP 7 mock questions 556 SCWCD 5 mock questions 500 OCEJWCD 6 mock questions pdfDownload (java,struts, hibernet etc)

Tutorial Home


  • Advantage of Hibernate over JDBC
  • Hibernate Setup with an web Application
  • First Hibernate Application
  • Hibernate mapping with Database TABLE
  • Hibernate Data Type-Java Data Type - SQL Data Type mapping
  • One to Many Relation in Hibernate
  • One to Many Relation in Hibernate bi-directional
  • Many to Many Relation in Hibernate
  • HQL: The Hibernate Query Language
  • Criteria Queries
  • Criteria Queries : Equal (eq), Not Equal(ne), Less than (le), greater than (gt),greater than or equal(ge) and Ordering the results
  • Criteria Queries: And OR conditions
  • Hibernate generator to generate id (primary key)
  • prevent concurrent update in Hibernate,slate object updatation in Hibernate,version checking in Hibernate


  • Model View Controller (MVC)
  • Model View Controller (MVC)
  • Struts Flow-How Struts Works?
  • Struts Tutorial - Struts Setup- First Struts Action class setup
  • Message Resources
  • Validation Framework
  • Validation Framework-client side
  • ForwardAction
  • IncludeAction
  • DispatchAction
  • LookupDispatchAction
  • DynaActionForm
  • DynaActionForm
  • Struts Tutorial - Mutli-click prevention using struts tokens-Prevent Duplicate Submission
  • Logic Iterate Map and List


  • JSP Tutorial
  • Introduction to JSP
  • JSP Comments
  • JSP Syntax
  • JSP Scripting Elements :Scriptlet, expression, declaration
  • JSP Directives
  • implicit objects in JSP
  • JSP Actions
  • Introduction to JSP
  • jsp:useBean
  • The jsp:setProperty Action
  • The jsp:getProperty Action
  • Introduction to JSP


  • Spring Tutorial
  • Introduction to Spring
  • Benefits of Using Spring Framework
  • Inversion of Control in Spring
  • Introduction to BeanFactory
  • Dependency Injection in Spring
  • Collections Setter Injection
  • Bean Scopes in Spring
  • Spring IOC Setup Step by Step
  • Bean Lifecycle in Spring
  • ApplicationContext
  • MessageSources in Spring
  • Web Spring MVC framework
  • Developing Your First Spring Web Application
  • Developing Your Second Spring Web Application with Spring Form
  • Developing Your First Spring Web Application with Spring Validation Framework with Code Example
  • Spring integration with Hibernate
  • The JDBC Driver Manager

    The JDBC Driver Manager

    The main responsibility of  JDBC database driver is to load all the drivers found in the system properly as well as to select the most  appropriate driver from opening a connection to a database.  The Driver Manager also helps to select the most appropriate driver from the previously loaded drivers when a new open database is connected.  

    These are the steps happing inside TO get Connection
    Step 1.
    Class.forName("com.mysql.jdbc.Driver") load the Driver.
    Step 2.
    In the com.mysql.jdbc.Driver class there is static bock . That will execute because of static bock.
    DriverManager.registerDriver(new Driver());
    catch(SQLException E)
    throw new RuntimeException("Can't register driver!");
    This static block call DriverManager.registerDriver(new Driver());
    Step 3.
    Inside DriverManager.registerDriver() method.
    public static synchronized void registerDriver(java.sql.Driver driver)
    throws SQLException {
    DriverInfo di = new DriverInfo();
    di.driver = driver;
    di.driverClass = driver.getClass();
    di.driverClassName = di.driverClass.getName();
    println("registerDriver: " + di);
    DriverManager class create a Vector name drivers and add the Driver class to the vector.
    Now In the Vector we have com.mysql.jdbc.Driver object.

    Step 4.
    To get connection we can
    Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/testDB",username,password);
    In this method , it search the Driver in the vector , if available then connect and return connection.
    for (int i = 0; i < drivers.size(); i++) {
    DriverInfo di = (DriverInfo)drivers.elementAt(i);
    // if ?jdbc:mysql? keywork withic in input , match with the driver in the vector {
    Connection result = di.driver.connect(url, info);

    Return connection;
    This class getting jdbc:mysql://localhost:3306/testDB as input . This class check for the driver based on ?jdbc:mysql? in this case and connect the driver.

    The DriverManager class works between the user and the drivers. The task of the DriverManager class is to keep track of the drivers that are available and handles establishing a connection between a database and the appropriate driver. It even keeps track of the driver login time limits and printing of log and tracing messages. This class is mainly useful for the simple application, the most frequently used method of this class is DriverManager.getConnetion(). We can know by the name of the method that this method establishes a connection to a database.

    The DriverManager class maintains the list of the Driver classes. Each driver has to be get registered in the DriverManager class by calling the method DriverManager.registerDriver().

    By calling the Class.forName() method the driver class get automatically loaded. The driver is loaded by calling the Class.forName() method. JDBC drivers are designed to tell the DriverManager about themselves automatically when their driver implementation class get loads.

    This class has many methods. Some of the commonly used methods are given below:

    1. deregisterDriver(Driver driver) : It drops the driver from the list of drivers registered in the DriverManager class.
    2. registerDriver(Driver driver) : It registers the driver with the DriverManager class.
    3. getConnection(String url) : It tries to establish the connection to a given database URL.
    4. getConnection(String url, Sting user, String password) : It tries to establish the connection to a given database URL.
    5. getConnection(String url, Properties info) : It tries to establish the connection to a given database URL.
    6. getDriver(String url) : It attempts to locate the driver by the given string.
    7. getDrivers() : It retrieves the enumeration of the drivers which has been registered with the DriverManager class.

    The information you are posting should be related to java and ORACLE technology. Not political.