Please send your Questions & Answers or Feedback to ""

Can we get JDBC Connection from Session ?

We can get JDBC Connection from Session.
Connection con = session.connection();
Note : JDBC Connection and Session both are not same because using Connection we cant store an object in the DataBase but using Session we can store an object in the DB.
Session internally contains the Connection object with Has-A relation....
        class A{}
        class B extends A{}
        class B{
            private A a;
    we can give JDBC Connection to the session...
    Session session = sFactory.openSession(con);
Related Posts Plugin for WordPress, Blogger...
Flag Counter