Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jdbc vs Hibernate support Jdbc

 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,

in hibernate we can get jdbc support through session.connection() [java.sql.Connection]example



here [know that it is poor practice since i am not going to deal with javabean] everything looks like ordinary jdbc intraction .

for doing this we dont go for hibernate instead we can get it through jdbc itself or Connection pooling.

is there any difference (Advantage)?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate allows direct access to JDBC for the same reason it provides methods to run SQL directly: for the few cases where your specific application logic requires you do something with the database that cannot be done through Hibernate itself. For example, you might want to create database users in your application. The disadvantage is you tie your applciation into the specifics of one particular database.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic