• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connecton API

 
naveen sakhare
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone explain me the Connection API.Like how drivermanger.getConnection() will work. It will be a great help.
 
Winston Gutkowski
Bartender
Pie
Posts: 10571
64
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
naveen sakhare wrote:Can someone explain me the Connection API.Like how drivermanger.getConnection() will work. It will be a great help.

What do you want to know?

Winston
 
naveen sakhare
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Winston Gutkowski wrote:
naveen sakhare wrote:Can someone explain me the Connection API.Like how drivermanger.getConnection() will work. It will be a great help.

What do you want to know?

Winston


I want to know how exactly the getConnection will get the Connection object..

Thank you,
Naveen
 
Tim Cooke
Sheriff
Pie
Posts: 3204
142
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know the answer, but I do know that I will probably never ever need to know the answer.

Which leads me to wonder, why do you want to know exactly?
 
naveen sakhare
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Cooke wrote:I don't know the answer, but I do know that I will probably never ever need to know the answer.

Which leads me to wonder, why do you want to know exactly?


well,I attended a job interview,So they asked about this and I was also not aware of this.
 
Tim Cooke
Sheriff
Pie
Posts: 3204
142
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a very productive thing to ask in an interview if you ask me (which you didn't of course).

However, assuming that you're talking about this DriverManager then given getConnection() takes a String parameter I would hazard a guess that there's some Reflection magic going on behind the scenes to select the correct implementing class to do the work.
 
naveen sakhare
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Cooke wrote:Not a very productive thing to ask in an interview if you ask me (which you didn't of course).

However, assuming that you're talking about this DriverManager then given getConnection() takes a String parameter I would hazard a guess that there's some Reflection magic going on behind the scenes to select the correct implementing class to do the work.


Yes that is indeed a bad question. But just out of curiosity I want to have some idea about this.
 
Tim Cooke
Sheriff
Pie
Posts: 3204
142
Clojure IntelliJ IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are curious then have a look at the DriverManager source code
 
naveen sakhare
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Cooke wrote:If you are curious then have a look at the DriverManager source code


Thank you
 
Tim Cooke
Sheriff
Pie
Posts: 3204
142
Clojure IntelliJ IDE Java
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're very welcome.

And good luck with the job application.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic